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