diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java index 80eac348..6f952827 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/BackwardsStructuredItemRewriter.java @@ -95,7 +95,7 @@ public class BackwardsStructuredItemRewriter { + System.out.println(wrapper.passthrough(Type.STRING)); // Command + wrapper.passthrough(Type.LONG); // Timestamp + wrapper.passthrough(Type.LONG); // Salt + + final Integer passthrough = wrapper.passthrough(Type.VAR_INT); + System.out.println(passthrough); + if (passthrough != 0) { + return; + } + System.out.println(wrapper.passthrough(Type.VAR_INT)); + System.out.println(wrapper.passthrough(Type.ACKNOWLEDGED_BIT_SET)); + }); + registerClientbound(State.LOGIN, ClientboundLoginPackets.COOKIE_REQUEST.getId(), -1, wrapper -> handleCookieRequest(wrapper, ServerboundLoginPackets.COOKIE_RESPONSE)); + cancelClientbound(ClientboundConfigurationPackets1_20_5.RESET_CHAT); // Old clients already reset chat when entering the configuration phase registerClientbound(ClientboundConfigurationPackets1_20_5.COOKIE_REQUEST, null, wrapper -> handleCookieRequest(wrapper, ServerboundConfigurationPackets1_20_5.COOKIE_RESPONSE)); registerClientbound(ClientboundConfigurationPackets1_20_5.STORE_COOKIE, null, this::handleStoreCookie); registerClientbound(ClientboundConfigurationPackets1_20_5.TRANSFER, null, this::handleTransfer); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java index 314e9dfd..ea053d34 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_20_3to1_20_5/rewriter/EntityPacketRewriter1_20_5.java @@ -101,7 +101,9 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter { @@ -289,6 +301,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter