From 623b6e06d6e7c3e0ff9f932ff1e8d9d91492b3f2 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 6 Jan 2014 00:56:00 -0600 Subject: [PATCH] Fixed Cable Render Bug. --- parts/networking/PartCable.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/parts/networking/PartCable.java b/parts/networking/PartCable.java index a37228124..0ff1611ca 100644 --- a/parts/networking/PartCable.java +++ b/parts/networking/PartCable.java @@ -722,6 +722,7 @@ public class PartCable extends AEBasePart implements IPartCable public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer) { boolean useCovered = false; + boolean requireDetailed = false; for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { @@ -736,6 +737,14 @@ public class PartCable extends AEBasePart implements IPartCable break; } } + else if ( connections.contains( dir ) ) + { + TileEntity te = this.tile.worldObj.getBlockTileEntity( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ ); + IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null; + IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null; + if ( ccph == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS ) + requireDetailed = true; + } } if ( useCovered ) @@ -784,7 +793,7 @@ public class PartCable extends AEBasePart implements IPartCable } } - if ( connections.size() != 2 || !nonLinear( connections ) || useCovered ) + if ( connections.size() != 2 || !nonLinear( connections ) || useCovered || requireDetailed ) { if ( useCovered ) {