Fixed Cable Render Bug.
This commit is contained in:
parent
6e54818595
commit
623b6e06d6
1 changed files with 10 additions and 1 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue