Fix SET_CURSOR_ITEM container id type (#905)

This commit is contained in:
RK_01 2024-10-30 17:05:57 +01:00 committed by GitHub
parent c7a5de1176
commit 7b5ee01929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ public final class BlockItemPacketRewriter1_21_2 extends BackwardsStructuredItem
});
protocol.registerClientbound(ClientboundPackets1_21_2.SET_CURSOR_ITEM, ClientboundPackets1_21.CONTAINER_SET_SLOT, wrapper -> {
wrapper.write(Types.BYTE, (byte) -1); // Player inventory
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);