diff --git a/src/main/java/crazypants/enderio/conduit/item/NetworkedInventory.java b/src/main/java/crazypants/enderio/conduit/item/NetworkedInventory.java index 56005cb4..fa63c0a6 100644 --- a/src/main/java/crazypants/enderio/conduit/item/NetworkedInventory.java +++ b/src/main/java/crazypants/enderio/conduit/item/NetworkedInventory.java @@ -92,7 +92,6 @@ public class NetworkedInventory { } public void onTick(long tick) { - int transfered; if(tickDeficit > 0 || !canExtract() || !con.isExtractionRedstoneConditionMet(conDir)) { //do nothing } else { diff --git a/src/main/java/crazypants/util/ItemUtil.java b/src/main/java/crazypants/util/ItemUtil.java index 81451cba..f974783a 100644 --- a/src/main/java/crazypants/util/ItemUtil.java +++ b/src/main/java/crazypants/util/ItemUtil.java @@ -90,6 +90,7 @@ public class ItemUtil { ItemStack contents = sidedInv.getStackInSlot(slot); ItemStack toInsert = item.copy(); toInsert.stackSize = Math.min(toInsert.stackSize, sidedInv.getInventoryStackLimit()); + toInsert.stackSize = Math.min(toInsert.stackSize, toInsert.getMaxStackSize()); // some inventories like filing cap toInsert.stackSize = Math.min(toInsert.stackSize, numToInsert); int inserted = 0; if(contents == null) { @@ -126,6 +127,7 @@ public class ItemUtil { if(!isStackFull(contents)) { ItemStack toInsert = item.copy(); toInsert.stackSize = Math.min(toInsert.stackSize, inv.getInventoryStackLimit()); + toInsert.stackSize = Math.min(toInsert.stackSize, toInsert.getMaxDamage()); // some inventories like filing cap toInsert.stackSize = Math.min(toInsert.stackSize, numToInsert); int inserted = 0; if(contents == null) {