Made default slot implementation respect inventory stack size limit.
This commit is contained in:
parent
5c78361b27
commit
dc871ea273
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ public class VanillaInventoryCodeHooks
|
||||||
for (int j = 0; j < dest.getSizeInventory(); j++)
|
for (int j = 0; j < dest.getSizeInventory(); j++)
|
||||||
{
|
{
|
||||||
ItemStack destStack = dest.getStackInSlot(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);
|
extractItem = handler.extractItem(i, 1, false);
|
||||||
if (destStack == null)
|
if (destStack == null)
|
||||||
|
|
Loading…
Reference in a new issue