diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20to1_20_2/rewriter/EntityPacketRewriter1_20_2.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20to1_20_2/rewriter/EntityPacketRewriter1_20_2.java index cc9a53b1..3441f958 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20to1_20_2/rewriter/EntityPacketRewriter1_20_2.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20to1_20_2/rewriter/EntityPacketRewriter1_20_2.java @@ -43,15 +43,6 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter { - wrapper.passthrough(Type.VAR_INT); // Entity id - wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id - }); - protocol.registerClientbound(ClientboundPackets1_20_2.ENTITY_EFFECT, wrapper -> { - wrapper.passthrough(Type.VAR_INT); // Entity id - wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id - }); - protocol.registerClientbound(ClientboundPackets1_20_2.JOIN_GAME, new PacketHandlers() { @Override public void register() { @@ -123,7 +114,7 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter { wrapper.passthrough(Type.VAR_INT); // Entity id - wrapper.passthrough(Type.VAR_INT); // Effect id + wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id wrapper.passthrough(Type.BYTE); // Amplifier wrapper.passthrough(Type.VAR_INT); // Duration wrapper.passthrough(Type.BYTE); // Flags @@ -131,6 +122,11 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter { + wrapper.passthrough(Type.VAR_INT); // Entity id + wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id + }); } @Override