Fixed IC2reactorLaser not always refreshing

Issue was visible intermittently, notably during ship rotation
This commit is contained in:
LemADEC 2016-03-06 15:16:05 +01:00
parent 48b205fb91
commit b23c2de68f

View file

@ -16,6 +16,7 @@ import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.Optional;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.block.TileEntityAbstractEnergy;
import cr0s.warpdrive.config.WarpDriveConfig;
import cr0s.warpdrive.data.Vector3;
@ -26,6 +27,7 @@ public class TileEntityIC2reactorLaserMonitor extends TileEntityAbstractEnergy {
private int ticks = WarpDriveConfig.IC2_REACTOR_COOLING_INTERVAL_TICKS;
private byte activeSides = 0;
private boolean updateFlag = false;
private boolean isFirstTick = true;
public TileEntityIC2reactorLaserMonitor() {
super();
@ -123,6 +125,12 @@ public class TileEntityIC2reactorLaserMonitor extends TileEntityAbstractEnergy {
return;
}
if (isFirstTick) {
isFirstTick = false;
updateFlag = (getBlockMetadata() & 1) == 0;
WarpDrive.logger.info("" + this + " isFirstTick " + activeSides + " " + updateFlag);
}
ticks--;
if (ticks <= 0) {
ticks = WarpDriveConfig.IC2_REACTOR_COOLING_INTERVAL_TICKS;