3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Fix handling of animation 3 in 1.8->1.9 (#2358)

Dieser Commit ist enthalten in:
RK_01 2021-02-26 14:45:55 +01:00 committet von GitHub
Ursprung 9fbadc0ad5
Commit 3c73d70f63
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -318,6 +318,22 @@ public class EntityPackets {
} }
}); });
protocol.registerOutgoing(ClientboundPackets1_8.ENTITY_ANIMATION, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // 0 - Entity ID
map(Type.UNSIGNED_BYTE); // 1 - Animation
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
if(wrapper.get(Type.UNSIGNED_BYTE, 0) == 3) {
wrapper.cancel();
}
}
});
}
});
/* Incoming Packets */ /* Incoming Packets */
protocol.registerIncoming(ServerboundPackets1_9.ENTITY_ACTION, new PacketRemapper() { protocol.registerIncoming(ServerboundPackets1_9.ENTITY_ACTION, new PacketRemapper() {