Skip to content

Commit

Permalink
Fix remapping of 1.20.5 CLICK_WINDOW_BUTTON
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrygames committed Apr 27, 2024
1 parent c4d0c7a commit bf7ed14
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public void registerPackets() {
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
registerCreativeInvAction(ServerboundPackets1_20_3.CREATIVE_INVENTORY_ACTION);
protocol.registerServerbound(ServerboundPackets1_20_3.CLICK_WINDOW_BUTTON, wrapper -> {
final int containerId = wrapper.read(Type.VAR_INT);
final int buttonId = wrapper.read(Type.VAR_INT);
wrapper.write(Type.BYTE, (byte) containerId);
wrapper.write(Type.BYTE, (byte) buttonId);
final int containerId = wrapper.read(Type.BYTE) & 0xFF;
final int buttonId = wrapper.read(Type.BYTE) & 0xFF;
wrapper.write(Type.VAR_INT, containerId);
wrapper.write(Type.VAR_INT, buttonId);
});

protocol.registerClientbound(ClientboundPackets1_20_5.SPAWN_PARTICLE, wrapper -> {
Expand Down

0 comments on commit bf7ed14

Please sign in to comment.