Fix loop in TileEngine

This commit is contained in:
CovertJaguar 2013-09-15 23:18:36 -07:00
parent 1aaa35c5b1
commit cde67912f6

View file

@ -54,6 +54,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
protected PowerHandler powerHandler;
public float currentOutput = 0;
public boolean isRedstonePowered = false;
private boolean checkOrienation = false;
private TileBuffer[] tileCache;
public float progress;
public float energy;
@ -169,6 +170,12 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
return;
}
if (checkOrienation) {
checkOrienation = false;
if (!isOrientationValid())
switchOrientation(true);
}
updateHeatLevel();
engineUpdate();
@ -291,14 +298,14 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
public void invalidate() {
super.invalidate();
tileCache = null;
checkOrienation = true;
}
@Override
public void validate() {
super.validate();
tileCache = null;
if (!isOrientationValid())
switchOrientation(true);
checkOrienation = true;
}
@Override