Made default slot implementation respect inventory stack size limit.

This commit is contained in:
Draco18s 2016-11-01 16:41:14 -04:00 committed by LexManos
parent 5c78361b27
commit dc871ea273

View file

@ -50,7 +50,7 @@ public class VanillaInventoryCodeHooks
for (int j = 0; j < dest.getSizeInventory(); j++)
{
ItemStack destStack = dest.getStackInSlot(j);
if (destStack == null || destStack.stackSize < destStack.getMaxStackSize() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack))
if (destStack == null || destStack.stackSize < destStack.getMaxStackSize() && destStack.stackSize < dest.getInventoryStackLimit() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack))
{
extractItem = handler.extractItem(i, 1, false);
if (destStack == null)