Fixed Cable Render Bug.

This commit is contained in:
AlgorithmX2 2014-01-06 00:56:00 -06:00
parent 6e54818595
commit 623b6e06d6

View file

@ -722,6 +722,7 @@ public class PartCable extends AEBasePart implements IPartCable
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer) public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{ {
boolean useCovered = false; boolean useCovered = false;
boolean requireDetailed = false;
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{ {
@ -736,6 +737,14 @@ public class PartCable extends AEBasePart implements IPartCable
break; 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 ) 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 ) if ( useCovered )
{ {