3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-09 17:50:20 +01:00

Update to 1.17.1-rc1

Dieser Commit ist enthalten in:
Camotoy 2021-07-04 10:42:28 -04:00
Ursprung 74a5a4a366
Commit 605f56b895
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 10 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -154,7 +154,7 @@
<dependency> <dependency>
<groupId>com.github.steveice10</groupId> <groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId> <artifactId>mcprotocollib</artifactId>
<version>1.17.1-pre1-SNAPSHOT</version> <version>1.17.1-rc1-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>

Datei anzeigen

@ -25,22 +25,23 @@
package org.geysermc.connector.network.translators.java.entity; 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.entity.Entity;
import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator; import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.network.translators.Translator; import org.geysermc.connector.network.translators.Translator;
@Translator(packet = ServerRemoveEntityPacket.class) @Translator(packet = ServerRemoveEntitiesPacket.class)
public class JavaRemoveEntityTranslator extends PacketTranslator<ServerRemoveEntityPacket> { public class JavaRemoveEntitiesTranslator extends PacketTranslator<ServerRemoveEntitiesPacket> {
@Override @Override
public void translate(ServerRemoveEntityPacket packet, GeyserSession session) { public void translate(ServerRemoveEntitiesPacket packet, GeyserSession session) {
Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId()); for (int entityId : packet.getEntityIds()) {
Entity entity = session.getEntityCache().getEntityByJavaId(entityId);
if (entity != null) { if (entity != null) {
session.getEntityCache().removeEntity(entity, false); session.getEntityCache().removeEntity(entity, false);
} }
} }
} }
}