3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

Merge pull request #1543 from KennyTV/dev

Fix blaze remap and entity destroy in 1.15
Dieser Commit ist enthalten in:
Myles 2019-11-30 18:32:05 +00:00 committet von GitHub
Commit 0327b66a1d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 19 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -102,7 +102,7 @@ public class Entity1_15Types {
// Monsters // Monsters
ABSTRACT_MONSTER(-1, ABSTRACT_CREATURE), ABSTRACT_MONSTER(-1, ABSTRACT_CREATURE),
BLAZE(4, ABSTRACT_MONSTER), BLAZE(5, ABSTRACT_MONSTER),
CREEPER(12, ABSTRACT_MONSTER), CREEPER(12, ABSTRACT_MONSTER),
ENDERMITE(21, ABSTRACT_MONSTER), ENDERMITE(21, ABSTRACT_MONSTER),
ENDERMAN(20, ABSTRACT_MONSTER), ENDERMAN(20, ABSTRACT_MONSTER),

Datei anzeigen

@ -199,7 +199,7 @@ public class Protocol1_15To1_14_4 extends Protocol {
registerOutgoing(State.PLAY, 0x34, 0x35); registerOutgoing(State.PLAY, 0x34, 0x35);
registerOutgoing(State.PLAY, 0x35, 0x36); registerOutgoing(State.PLAY, 0x35, 0x36);
registerOutgoing(State.PLAY, 0x36, 0x37); registerOutgoing(State.PLAY, 0x36, 0x37);
registerOutgoing(State.PLAY, 0x37, 0x38);
registerOutgoing(State.PLAY, 0x38, 0x39); registerOutgoing(State.PLAY, 0x38, 0x39);
registerOutgoing(State.PLAY, 0x39, 0x3A); registerOutgoing(State.PLAY, 0x39, 0x3A);
registerOutgoing(State.PLAY, 0x3B, 0x3C); registerOutgoing(State.PLAY, 0x3B, 0x3C);

Datei anzeigen

@ -128,6 +128,23 @@ public class EntityPackets {
}); });
} }
}); });
// Destroy entities
protocol.registerOutgoing(State.PLAY, 0x37, 0x38, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT_ARRAY);
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
EntityTracker entityTracker = wrapper.user().get(EntityTracker.class);
for (int entity : wrapper.get(Type.VAR_INT_ARRAY, 0)) {
entityTracker.removeEntity(entity);
}
}
});
}
});
} }
public static int getNewEntityId(int oldId) { public static int getNewEntityId(int oldId) {