Skip to content

Commit

Permalink
Actually check the stack size of the item (#197, #198)
Browse files Browse the repository at this point in the history
  • Loading branch information
alcatrazEscapee authored Apr 27, 2023
1 parent 97f6c8e commit 2021b01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public SmartItemHandlerSlot(IItemHandler itemHandler, int index, int xPosition,

@Override
public int getMaxStackSize(ItemStack stack) {
return getItemHandler().getSlotLimit(getSlotIndex());
return Math.min(stack.getMaxStackSize(), getItemHandler().getSlotLimit(getSlotIndex()));
}
}

0 comments on commit 2021b01

Please sign in to comment.