From cde67912f66fe5834daa3e83c3d1e93630499e1a Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Sun, 15 Sep 2013 23:18:36 -0700 Subject: [PATCH] Fix loop in TileEngine --- common/buildcraft/energy/TileEngine.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index 4e89fe32..d76a8432 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -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