diff options
Diffstat (limited to 'src/main/java/gregtech/common/GT_Client.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Client.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 2a93e541b5..0ce1e284ca 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -5,6 +5,7 @@ package gregtech.common; +import static gregtech.api.enums.GT_Values.ALL_VALID_SIDES; import static gregtech.api.enums.GT_Values.calculateMaxPlasmaTurbineEfficiency; import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; @@ -328,16 +329,17 @@ public class GT_Client extends GT_Proxy implements Runnable { byte tConnections = 0; if (tTile instanceof ICoverable) { if (showCoverConnections) { - for (byte i = 0; i < 6; i++) { - if (((ICoverable) tTile).getCoverIDAtSide(i) > 0) tConnections = (byte) (tConnections + (1 << i)); + for (byte tSide : ALL_VALID_SIDES) { + if (((ICoverable) tTile).getCoverIDAtSide(tSide) > 0) + tConnections = (byte) (tConnections + (1 << tSide)); } } else if (tTile instanceof BaseMetaPipeEntity) tConnections = ((BaseMetaPipeEntity) tTile).mConnections; } if (tConnections > 0) { - for (byte i = 0; i < 6; i++) { - if ((tConnections & (1 << i)) != 0) { - switch (GRID_SWITCH_TABLE[aEvent.target.sideHit][i]) { + for (byte tSide : ALL_VALID_SIDES) { + if ((tConnections & (1 << tSide)) != 0) { + switch (GRID_SWITCH_TABLE[aEvent.target.sideHit][tSide]) { case 0: GL11.glVertex3d(+.25D, .0D, +.25D); GL11.glVertex3d(-.25D, .0D, -.25D); @@ -787,8 +789,8 @@ public class GT_Client extends GT_Proxy implements Runnable { || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sCrowbarList) || GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sScrewdriverList)) { if (((ICoverable) aTileEntity).getCoverIDAtSide((byte) aEvent.target.sideHit) == 0) - for (byte i = 0; i < 6; i++) - if (((ICoverable) aTileEntity).getCoverIDAtSide(i) > 0) { + for (byte tSide : ALL_VALID_SIDES) + if (((ICoverable) aTileEntity).getCoverIDAtSide(tSide) > 0) { drawGrid(aEvent, true, false, true); return; } |