Fixed Hoppers not inserting fully into custom contains with slots that can hold more then max stack (#6631)

This commit is contained in:
Richard Freimer 2020-05-03 16:34:26 -04:00 committed by GitHub
parent 1fa88ebd56
commit 035c01e222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -194,15 +194,13 @@ public class VanillaInventoryCodeHooks
if (!destinationHopper.mayTransfer())
{
int k = 0;
/* TODO TileEntityHopper patches
if (source instanceof TileEntityHopper)
if (source instanceof HopperTileEntity)
{
if (destinationHopper.getLastUpdateTime() >= ((TileEntityHopper) source).getLastUpdateTime())
if (destinationHopper.getLastUpdateTime() >= ((HopperTileEntity) source).getLastUpdateTime())
{
k = 1;
}
}
*/
destinationHopper.setTransferCooldown(8 - k);
}
}
@ -225,7 +223,7 @@ public class VanillaInventoryCodeHooks
for (int slot = 0; slot < itemHandler.getSlots(); slot++)
{
ItemStack stackInSlot = itemHandler.getStackInSlot(slot);
if (stackInSlot.isEmpty() || stackInSlot.getCount() != stackInSlot.getMaxStackSize())
if (stackInSlot.isEmpty() || stackInSlot.getCount() < itemHandler.getSlotLimit(slot))
{
return false;
}