Skip to content

Commit

Permalink
Fixed out of index size in tracker component.
Browse files Browse the repository at this point in the history
I really do not know why I get this error.
  • Loading branch information
MrsRina committed Dec 28, 2021
1 parent 8cc2480 commit 868f5a9
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ public WindowClickTracker(int windowId, int slotId, int mouseButton, ClickType t

@Override
public void onPre() {
short short1 = player.openContainer.getNextTransactionID(player.inventory);
ItemStack itemstack = player.openContainer.slotClick(slotId, mouseButton, type, player);
boolean flush = true;

this.setPacket(new CPacketClickWindow(windowId, slotId, mouseButton, type, itemstack, short1));
try {
short short1 = player.openContainer.getNextTransactionID(player.inventory);
ItemStack itemstack = player.openContainer.slotClick(slotId, mouseButton, type, player);

this.setPacket(new CPacketClickWindow(windowId, slotId, mouseButton, type, itemstack, short1));
} catch (Exception exc) {
flush = false;
}
}
}
}

0 comments on commit 868f5a9

Please sign in to comment.