Improvement

This commit is contained in:
Raoul Van den Berge
2016-06-14 13:56:10 +02:00
parent 4338065b89
commit d944070626
2 changed files with 1 additions and 4 deletions

View File

@@ -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);

View File

@@ -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);
}