From 5b09618ad286d62877cf49a10ecc499d946780ba Mon Sep 17 00:00:00 2001 From: drcrazy Date: Sun, 10 Sep 2017 01:15:07 +0300 Subject: [PATCH] Fix double tile entity update --- .../java/techreborn/tiles/TileIndustrialCentrifuge.java | 5 ++--- .../tiles/multiblock/TileImplosionCompressor.java | 3 +-- .../techreborn/tiles/multiblock/TileIndustrialGrinder.java | 4 +--- .../java/techreborn/tiles/multiblock/TileVacuumFreezer.java | 6 +++--- src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java | 1 - src/main/java/techreborn/tiles/teir1/TileCompressor.java | 1 - src/main/java/techreborn/tiles/teir1/TileExtractor.java | 1 - src/main/java/techreborn/tiles/teir1/TileGrinder.java | 1 - 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java b/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java index 9a119fa99..aec8d8eae 100644 --- a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java +++ b/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java @@ -78,9 +78,8 @@ public class TileIndustrialCentrifuge extends TilePowerAcceptor } @Override - public void updateEntity() { - super.updateEntity(); - this.crafter.updateEntity(); + public void update() { + super.update(); this.charge(6); if (this.inventory.getStackInSlot(6) != ItemStack.EMPTY) { final ItemStack stack = this.inventory.getStackInSlot(6); diff --git a/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java b/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java index 5a19d672d..b16d539fd 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java +++ b/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java @@ -75,9 +75,8 @@ public class TileImplosionCompressor extends TilePowerAcceptor @Override public void update() { - super.update(); if (this.getMutliBlock()) { - this.crafter.updateEntity(); + super.update(); } } diff --git a/src/main/java/techreborn/tiles/multiblock/TileIndustrialGrinder.java b/src/main/java/techreborn/tiles/multiblock/TileIndustrialGrinder.java index 807a41170..eca880edd 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileIndustrialGrinder.java +++ b/src/main/java/techreborn/tiles/multiblock/TileIndustrialGrinder.java @@ -104,15 +104,13 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IToolDro public void update() { ticksSinceLastChange++; - super.update(); - if (this.multiblockChecker == null) { final BlockPos pos = this.getPos().offset(this.getFacing().getOpposite(), 2).down(); this.multiblockChecker = new MultiblockChecker(this.world, pos); } if (this.getMutliBlock()) { - this.crafter.updateEntity(); + super.update(); } //Check cells input slot 2 time per second diff --git a/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java b/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java index 562722fba..3dc8fed58 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java +++ b/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java @@ -62,9 +62,9 @@ public class TileVacuumFreezer extends TilePowerAcceptor @Override public void update() { - super.update(); - if (this.getMultiBlock()) - this.crafter.updateEntity(); + if (this.getMultiBlock()) { + super.update(); + } } public boolean getMultiBlock() { diff --git a/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java b/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java index 6f994eb47..1530e607a 100644 --- a/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java +++ b/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java @@ -76,7 +76,6 @@ public class TileAlloySmelter extends TilePowerAcceptor @Override public void update() { super.update(); - this.crafter.updateEntity(); this.charge(3); } diff --git a/src/main/java/techreborn/tiles/teir1/TileCompressor.java b/src/main/java/techreborn/tiles/teir1/TileCompressor.java index 987de4447..a76e5a469 100644 --- a/src/main/java/techreborn/tiles/teir1/TileCompressor.java +++ b/src/main/java/techreborn/tiles/teir1/TileCompressor.java @@ -59,7 +59,6 @@ public class TileCompressor extends TilePowerAcceptor implements IToolDrop, IInv public void update() { if (!this.world.isRemote) { super.update(); - this.crafter.updateEntity(); this.charge(3); } } diff --git a/src/main/java/techreborn/tiles/teir1/TileExtractor.java b/src/main/java/techreborn/tiles/teir1/TileExtractor.java index 068f162aa..ec9cdea84 100644 --- a/src/main/java/techreborn/tiles/teir1/TileExtractor.java +++ b/src/main/java/techreborn/tiles/teir1/TileExtractor.java @@ -62,7 +62,6 @@ public class TileExtractor extends TilePowerAcceptor public void update() { if (!this.world.isRemote) { super.update(); - this.crafter.updateEntity(); this.charge(3); } } diff --git a/src/main/java/techreborn/tiles/teir1/TileGrinder.java b/src/main/java/techreborn/tiles/teir1/TileGrinder.java index edac03dd4..8ce2333dd 100644 --- a/src/main/java/techreborn/tiles/teir1/TileGrinder.java +++ b/src/main/java/techreborn/tiles/teir1/TileGrinder.java @@ -62,7 +62,6 @@ public class TileGrinder extends TilePowerAcceptor public void update() { if (!this.world.isRemote) { super.update(); - //charge(3); TODO this.charge(3); } }