Small perf improvement in importer
This commit is contained in:
@@ -83,12 +83,12 @@ public class TileImporter extends TileMachine implements ICompareConfig, IModeCo
|
|||||||
|
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
if (ticks % RefinedStorageUtils.getSpeed(upgradesInventory) == 0) {
|
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 we can't import and/ or push, move on (otherwise we stay on the same slot forever)
|
||||||
if (canImport(toTake)) {
|
if (canImport(stack)) {
|
||||||
if (controller.push(toTake)) {
|
ItemStack taking = stack.copy();
|
||||||
|
taking.stackSize = 1;
|
||||||
|
|
||||||
|
if (controller.push(taking)) {
|
||||||
inventory.decrStackSize(currentSlot, 1);
|
inventory.decrStackSize(currentSlot, 1);
|
||||||
inventory.markDirty();
|
inventory.markDirty();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user