Small perf improvement in importer

This commit is contained in:
Raoul Van den Berge
2016-05-18 21:17:32 +02:00
parent fe4d5667e4
commit a517f47bd7

View File

@@ -83,12 +83,12 @@ public class TileImporter extends TileMachine implements ICompareConfig, IModeCo
if (stack != null) {
if (ticks % RefinedStorageUtils.getSpeed(upgradesInventory) == 0) {
ItemStack toTake = stack.copy();
toTake.stackSize = 1;
// If we can't import and/ or push, move on (otherwise we stay on the same slot forever)
if (canImport(toTake)) {
if (controller.push(toTake)) {
if (canImport(stack)) {
ItemStack taking = stack.copy();
taking.stackSize = 1;
if (controller.push(taking)) {
inventory.decrStackSize(currentSlot, 1);
inventory.markDirty();
} else {