Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Update to 1.17.1-rc1
Dieser Commit ist enthalten in:
Ursprung
74a5a4a366
Commit
605f56b895
@ -154,7 +154,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>mcprotocollib</artifactId>
|
||||
<version>1.17.1-pre1-SNAPSHOT</version>
|
||||
<version>1.17.1-rc1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -25,21 +25,22 @@
|
||||
|
||||
package org.geysermc.connector.network.translators.java.entity;
|
||||
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.entity.ServerRemoveEntityPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.entity.ServerRemoveEntitiesPacket;
|
||||
import org.geysermc.connector.entity.Entity;
|
||||
import org.geysermc.connector.network.session.GeyserSession;
|
||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||
import org.geysermc.connector.network.translators.Translator;
|
||||
|
||||
@Translator(packet = ServerRemoveEntityPacket.class)
|
||||
public class JavaRemoveEntityTranslator extends PacketTranslator<ServerRemoveEntityPacket> {
|
||||
@Translator(packet = ServerRemoveEntitiesPacket.class)
|
||||
public class JavaRemoveEntitiesTranslator extends PacketTranslator<ServerRemoveEntitiesPacket> {
|
||||
|
||||
@Override
|
||||
public void translate(ServerRemoveEntityPacket packet, GeyserSession session) {
|
||||
Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
|
||||
|
||||
if (entity != null) {
|
||||
session.getEntityCache().removeEntity(entity, false);
|
||||
public void translate(ServerRemoveEntitiesPacket packet, GeyserSession session) {
|
||||
for (int entityId : packet.getEntityIds()) {
|
||||
Entity entity = session.getEntityCache().getEntityByJavaId(entityId);
|
||||
if (entity != null) {
|
||||
session.getEntityCache().removeEntity(entity, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren