From 3a67be7fe5add592cc5d2bf8be23307ba430f94e Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 8 Nov 2024 17:25:40 +0100 Subject: [PATCH] Don't forget to rewrite item in set cursor and set player inventory --- .../v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java index 80f0f140..aa4a4410 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java @@ -82,8 +82,7 @@ public final class BlockItemPacketRewriter1_21_2 extends BackwardsStructuredItem wrapper.write(Types.UNSIGNED_BYTE, (short) -1); // Player inventory wrapper.write(Types.VAR_INT, wrapper.user().get(InventoryStateIdStorage.class).stateId()); // State id; re-use the last known one wrapper.write(Types.SHORT, (short) -1); // Cursor - final Item item = wrapper.passthrough(Types1_21_2.ITEM); - handleItemToClient(wrapper.user(), item); + passthroughClientboundItem(wrapper); }); protocol.registerClientbound(ClientboundPackets1_21_2.OPEN_SCREEN, wrapper -> { @@ -168,6 +167,7 @@ public final class BlockItemPacketRewriter1_21_2 extends BackwardsStructuredItem wrapper.write(Types.VAR_INT, 0); // 0 state id final int slot = wrapper.read(Types.VAR_INT); wrapper.write(Types.SHORT, (short) slot); + passthroughClientboundItem(wrapper); }); protocol.registerClientbound(ClientboundPackets1_21_2.EXPLODE, wrapper -> {