Skip to content

Commit a171e40

Browse files
Only accept correct byte type in custom payload 1.8->1.7
1 parent 3e3561c commit a171e40

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

common/src/main/java/com/viaversion/viarewind/protocol/v1_8to1_7_6_10/rewriter/PlayerPacketRewriter1_8.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,7 @@ public void register() {
365365
if (channel.equals("MC|TrList")) {
366366
wrapper.passthrough(Types.INT); // Window id
367367

368-
int size;
369-
if (wrapper.isReadable(Types.BYTE, 0)) {
370-
size = wrapper.passthrough(Types.BYTE);
371-
} else {
372-
size = wrapper.passthrough(Types.UNSIGNED_BYTE);
373-
}
374-
368+
int size = wrapper.passthrough(Types.UNSIGNED_BYTE);
375369
for (int i = 0; i < size; i++) {
376370
Item item = protocol.getItemRewriter().handleItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_8));
377371
wrapper.write(RewindTypes.COMPRESSED_NBT_ITEM, item); // Buy item 1

0 commit comments

Comments
 (0)