Write inventory id as unsigned byte...

This commit is contained in:
Nassim Jahnke 2024-10-30 16:52:52 +01:00
parent 16aa6a51a2
commit c7a5de1176
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -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);