Skip to content

Commit b6042c8

Browse files
authored
Fix Crash when Clicking on a non-slot with a stack in hand (#53)
* fix a crash when clicking in the gui with an item on anything that's not a slot, * handle -1 slotid when quick moving
1 parent 09e1af3 commit b6042c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/cleanroommc/modularui/screen/ModularContainer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ public boolean canInteractWith(@NotNull EntityPlayer playerIn) {
189189
}
190190
return inventoryplayer.getItemStack();
191191
}
192+
193+
if (slotId < 0) return ItemStack.EMPTY;
194+
192195
if (clickTypeIn == ClickType.QUICK_MOVE) {
193196
Slot fromSlot = getSlot(slotId);
194197

0 commit comments

Comments
 (0)