Skip to content

Commit

Permalink
Fix Crash when Clicking on a non-slot with a stack in hand (#53)
Browse files Browse the repository at this point in the history
* fix a crash when clicking in the gui with an item on anything that's not a slot,

* handle -1 slotid when quick moving
  • Loading branch information
ghzdude committed Feb 16, 2024
1 parent 09e1af3 commit b6042c8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ public boolean canInteractWith(@NotNull EntityPlayer playerIn) {
}
return inventoryplayer.getItemStack();
}

if (slotId < 0) return ItemStack.EMPTY;

if (clickTypeIn == ClickType.QUICK_MOVE) {
Slot fromSlot = getSlot(slotId);

Expand Down

0 comments on commit b6042c8

Please sign in to comment.