Skip to content

Commit

Permalink
Only accept correct byte type in custom payload 1.8->1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jun 11, 2024
1 parent 3e3561c commit a171e40
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,7 @@ public void register() {
if (channel.equals("MC|TrList")) {
wrapper.passthrough(Types.INT); // Window id

int size;
if (wrapper.isReadable(Types.BYTE, 0)) {
size = wrapper.passthrough(Types.BYTE);
} else {
size = wrapper.passthrough(Types.UNSIGNED_BYTE);
}

int size = wrapper.passthrough(Types.UNSIGNED_BYTE);
for (int i = 0; i < size; i++) {
Item item = protocol.getItemRewriter().handleItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_8));
wrapper.write(RewindTypes.COMPRESSED_NBT_ITEM, item); // Buy item 1
Expand Down

0 comments on commit a171e40

Please sign in to comment.