Skip to content

Commit 3a67be7

Browse files
committed
Don't forget to rewrite item in set cursor and set player inventory
1 parent 8cb285d commit 3a67be7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/rewriter/BlockItemPacketRewriter1_21_2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public void registerPackets() {
8282
wrapper.write(Types.UNSIGNED_BYTE, (short) -1); // Player inventory
8383
wrapper.write(Types.VAR_INT, wrapper.user().get(InventoryStateIdStorage.class).stateId()); // State id; re-use the last known one
8484
wrapper.write(Types.SHORT, (short) -1); // Cursor
85-
final Item item = wrapper.passthrough(Types1_21_2.ITEM);
86-
handleItemToClient(wrapper.user(), item);
85+
passthroughClientboundItem(wrapper);
8786
});
8887

8988
protocol.registerClientbound(ClientboundPackets1_21_2.OPEN_SCREEN, wrapper -> {
@@ -168,6 +167,7 @@ public void registerPackets() {
168167
wrapper.write(Types.VAR_INT, 0); // 0 state id
169168
final int slot = wrapper.read(Types.VAR_INT);
170169
wrapper.write(Types.SHORT, (short) slot);
170+
passthroughClientboundItem(wrapper);
171171
});
172172

173173
protocol.registerClientbound(ClientboundPackets1_21_2.EXPLODE, wrapper -> {

0 commit comments

Comments
 (0)