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

This commit is contained in:
RK_01 2021-02-26 14:45:55 +01:00 committed by GitHub
parent 9fbadc0ad5
commit 3c73d70f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 */
protocol.registerIncoming(ServerboundPackets1_9.ENTITY_ACTION, new PacketRemapper() {