Fix loop in TileEngine
This commit is contained in:
parent
1aaa35c5b1
commit
cde67912f6
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue