Add getSlotLimit(slot) to IItemHandler (#3445)

This commit is contained in:
Vincent Lee authored and LexManos committed 2016-11-28 16:03:47 -08:00
1 parent b048c1a4b5
commit c17b40790b
9 files changed
+99 -5

No files matched your search

@@ -154,9 +154,15 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
}
}
@Override
public int getSlotLimit(int slot)
{
return 64;
}
protected int getStackLimit(int slot, @Nonnull ItemStack stack)
{
return stack.getMaxStackSize();
return Math.min(getSlotLimit(slot), stack.getMaxStackSize());
}
@Override