From c7a5de11768299efc48515b4a84314c9a73f20d5 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 30 Oct 2024 16:52:52 +0100 Subject: [PATCH] Write inventory id as unsigned byte... --- .../v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9e8dac22..40376f97 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 @@ -139,7 +139,7 @@ public final class BlockItemPacketRewriter1_21_2 extends BackwardsStructuredItem }); protocol.registerClientbound(ClientboundPackets1_21_2.SET_PLAYER_INVENTORY, ClientboundPackets1_21.CONTAINER_SET_SLOT, wrapper -> { - wrapper.write(Types.BYTE, (byte) -2); // Player inventory + wrapper.write(Types.UNSIGNED_BYTE, (short) -2); // Player inventory wrapper.write(Types.VAR_INT, 0); // 0 state id final int slot = wrapper.read(Types.VAR_INT); wrapper.write(Types.SHORT, (short) slot);