aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorghostflyby <ghostflyby+git@outlook.com>2023-11-25 16:03:19 +0800
committerGitHub <noreply@github.com>2023-11-25 16:03:19 +0800
commitf9e8d9a67bfe240be3cf701e64031864d36f0213 (patch)
tree71cf5bb88589b8f31dd32a8d7c7859636792d10c /src
parent62a687c305f95499a11c2805d1b7a2e6b753e447 (diff)
downloadGT5-Unofficial-f9e8d9a67bfe240be3cf701e64031864d36f0213.tar.gz
GT5-Unofficial-f9e8d9a67bfe240be3cf701e64031864d36f0213.tar.bz2
GT5-Unofficial-f9e8d9a67bfe240be3cf701e64031864d36f0213.zip
Show rotation grid direction for IC2 wrenchable and vanilla (#2377)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index f741f56927..bac93fa9e1 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -326,6 +326,8 @@ public class GT_Client extends GT_Proxy implements Runnable {
GL11.glVertex3d(-.25D, .0D, -.50D);
GL11.glVertex3d(-.25D, .0D, +.50D);
final TileEntity tTile = player.worldObj.getTileEntity(target.blockX, target.blockY, target.blockZ);
+ final Block block = player.worldObj.getBlock(target.blockX, target.blockY, target.blockZ);
+ final int meta = player.worldObj.getBlockMetadata(target.blockX, target.blockY, target.blockZ);
// draw connection indicators
int tConnections = 0;
@@ -335,6 +337,10 @@ public class GT_Client extends GT_Proxy implements Runnable {
if (iCoverable.getCoverIDAtSide(tSide) != 0) tConnections |= tSide.flag;
}
} else if (tTile instanceof BaseMetaPipeEntity) tConnections = ((BaseMetaPipeEntity) tTile).mConnections;
+ } else if (tTile instanceof IWrenchable wrenchable) {
+ tConnections |= ForgeDirection.getOrientation(wrenchable.getFacing()).flag;
+ } else if (ROTATABLE_VANILLA_BLOCKS.contains(block)) {
+ tConnections |= ForgeDirection.getOrientation(meta).flag;
}
if (tConnections != 0) {