Breaking and Damaging Particles for cables now work properly.

Breaking Animation now works on Cables as expected.
Cable now has a bounding box where it touches parts.
This commit is contained in:
AlgorithmX2
2014-06-11 00:14:37 -05:00
parent d807812bc8
commit bbfa43dd92
11 changed files with 211 additions and 1 deletions
+44
View File
@@ -330,6 +330,43 @@ public class PartCable extends AEBasePart implements IPartCable
connections.clear();
}
IPartHost ph = getHost();
if ( ph != null )
{
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
IPart p = ph.getPart( dir );
if ( p instanceof IGridHost )
{
double dist = p.cableConnectionRenderTo();
switch (dir)
{
case DOWN:
bch.addBox( 6.0, dist, 6.0, 10.0, 6.0, 10.0 );
break;
case EAST:
bch.addBox( 10.0, 6.0, 6.0, 16.0 - dist, 10.0, 10.0 );
break;
case NORTH:
bch.addBox( 6.0, 6.0, dist, 10.0, 10.0, 6.0 );
break;
case SOUTH:
bch.addBox( 6.0, 6.0, 10.0, 10.0, 10.0, 16.0 - dist );
break;
case UP:
bch.addBox( 6.0, 10.0, 6.0, 10.0, 16.0 - dist, 10.0 );
break;
case WEST:
bch.addBox( dist, 6.0, 6.0, 6.0, 10.0, 10.0 );
break;
default:
continue;
}
}
}
}
for (ForgeDirection of : connections)
{
switch (of)
@@ -370,6 +407,13 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setTexture( null );
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getBreakingTexture()
{
return getTexture( getCableColor() );
}
@SideOnly(Side.CLIENT)
public void rendereGlassConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of)
{