diff --git a/src/main/java/refinedstorage/tile/TileInterface.java b/src/main/java/refinedstorage/tile/TileInterface.java index 72176f679..8832bcbb2 100755 --- a/src/main/java/refinedstorage/tile/TileInterface.java +++ b/src/main/java/refinedstorage/tile/TileInterface.java @@ -50,7 +50,7 @@ public class TileInterface extends TileMachine implements ICompareConfig { if (slot == null) { currentSlot++; } else if (ticks % RefinedStorageUtils.getSpeed(upgrades) == 0) { - int size = RefinedStorageUtils.hasUpgrade(upgrades, ItemUpgrade.TYPE_STACK) ? 64 : 1; + int size = Math.min(slot.stackSize, RefinedStorageUtils.hasUpgrade(upgrades, ItemUpgrade.TYPE_STACK) ? 64 : 1); ItemStack remainder = controller.push(slot, size, false); diff --git a/src/main/java/refinedstorage/tile/controller/TileController.java b/src/main/java/refinedstorage/tile/controller/TileController.java index 9c2a99b97..57dc1790d 100755 --- a/src/main/java/refinedstorage/tile/controller/TileController.java +++ b/src/main/java/refinedstorage/tile/controller/TileController.java @@ -413,9 +413,6 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr return null; } - // We copy here because push can not modify the stack - // if we return the remainder (that will not be copied if there are no storages) - // user code can do something with the uncopied remainder. if (storages.isEmpty()) { return ItemHandlerHelper.copyStackWithSize(stack, size); }