Improved readability of variables

Hopefully improved semantics of variables

Fixed typos

Added hyphenations
This commit is contained in:
thatsIch
2014-09-28 11:47:17 +02:00
parent 6b60a0996b
commit 76b147fd5b
220 changed files with 1643 additions and 1662 deletions
@@ -312,7 +312,7 @@ public class PartCable extends AEBasePart implements IPartCable
EnumSet<ForgeDirection> myC = connections.clone();
boolean wasPowered = powered;
powered = false;
boolean chchanged = false;
boolean channelsChanged = false;
for (ForgeDirection d : ForgeDirection.values())
{
@@ -321,7 +321,7 @@ public class PartCable extends AEBasePart implements IPartCable
int ch = (sideOut >> (d.ordinal() * 4)) & 0xF;
if ( ch != channelsOnSide[d.ordinal()] )
{
chchanged = true;
channelsChanged = true;
channelsOnSide[d.ordinal()] = ch;
}
}
@@ -342,7 +342,7 @@ public class PartCable extends AEBasePart implements IPartCable
}
}
return !myC.equals( connections ) || wasPowered != powered || chchanged;
return !myC.equals( connections ) || wasPowered != powered || channelsChanged;
}
@Override
@@ -450,15 +450,15 @@ public class PartCable extends AEBasePart implements IPartCable
public void renderGlassConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null;
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( gh != null && ccph != null && gh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( ccph.getColor() ) );
else if ( ccph == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS )
if ( gh != null && partHost != null && gh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( partHost.getColor() ) );
else if ( partHost == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
switch (of)
@@ -562,15 +562,15 @@ public class PartCable extends AEBasePart implements IPartCable
public void renderCoveredConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isSmart = false;
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null
&& ccph.getColor() != AEColor.Transparent )
rh.setTexture( getGlassTexture( ccph.getColor() ) );
else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS )
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null
&& partHost.getColor() != AEColor.Transparent )
rh.setTexture( getGlassTexture( partHost.getColor() ) );
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
switch (of)
@@ -601,10 +601,10 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setTexture( getTexture( getCableColor() ) );
}
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getCoveredTexture( ccph.getColor() ) );
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.SMART && ccph.getPart( of.getOpposite() ) == null )
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.COVERED && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getCoveredTexture( partHost.getColor() ) );
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.SMART && partHost.getPart( of.getOpposite() ) == null )
{
isSmart = true;
rh.setTexture( getSmartTexture( getCableColor() ) );
@@ -642,8 +642,8 @@ public class PartCable extends AEBasePart implements IPartCable
if ( isSmart )
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -654,11 +654,11 @@ public class PartCable extends AEBasePart implements IPartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -668,23 +668,23 @@ public class PartCable extends AEBasePart implements IPartCable
}
@SideOnly(Side.CLIENT)
public void renderSmartConection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
public void renderSmartConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && ccph.getPart( of.getOpposite() ) == null
&& ccph.getColor() != AEColor.Transparent )
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of.getOpposite() ) == AECableType.GLASS && partHost.getPart( of.getOpposite() ) == null
&& partHost.getColor() != AEColor.Transparent )
{
isGlass = true;
rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
}
else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS )
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS )
{
rh.setTexture( getSmartTexture( myColor ) );
switch (of)
@@ -715,8 +715,8 @@ public class PartCable extends AEBasePart implements IPartCable
if ( true )
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -727,11 +727,11 @@ public class PartCable extends AEBasePart implements IPartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -740,9 +740,9 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setTexture( getTexture( getCableColor() ) );
}
else if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getSmartTexture( myColor = ccph.getColor() ) );
else if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getSmartTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getSmartTexture( getCableColor() ) );
@@ -777,16 +777,16 @@ public class PartCable extends AEBasePart implements IPartCable
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -867,9 +867,9 @@ public class PartCable extends AEBasePart implements IPartCable
else if ( connections.contains( dir ) )
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost gh = te instanceof IGridHost ? (IGridHost) te : null;
if ( ccph == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS )
if ( partHost == null && gh != null && gh.getCableConnectionType( dir ) != AECableType.GLASS )
requireDetailed = true;
}
}
@@ -109,19 +109,19 @@ public class PartCableCovered extends PartCable
GL11.glTranslated( -0.0, -0.0, 0.3 );
rh.setBounds( 5.0f, 5.0f, 2.0f, 11.0f, 11.0f, 14.0f );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
rh.renderInventoryFace( main, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -70,12 +70,12 @@ public class PartCableSmart extends PartCable
{
GL11.glTranslated( -0.0, -0.0, 0.3 );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -85,11 +85,11 @@ public class PartCableSmart extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -207,8 +207,8 @@ public class PartCableSmart extends PartCable
rh.renderBlock( x, y, z, renderer );
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -219,11 +219,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -237,7 +237,7 @@ public class PartCableSmart extends PartCable
{
for (ForgeDirection of : connections)
{
renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
}
rh.setTexture( getCoveredTexture( getCableColor() ) );
@@ -258,11 +258,11 @@ public class PartCableSmart extends PartCable
IIcon def = getTexture( getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon offa = new OffsetIcon( defa, 0, -12 );
IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon offb = new OffsetIcon( defb, 0, -12 );
IIcon secondTaughtIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffsetIcon = new OffsetIcon( secondTaughtIcon, 0, -12 );
switch (selectedSide)
{
@@ -280,11 +280,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, offa, offa, offa, offa );
rh.setTexture( firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, offb, offb, offb, offb );
rh.setTexture( secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
@@ -306,21 +306,21 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlippableIcon fpA = new FlippableIcon( defa );
FlippableIcon fpB = new FlippableIcon( defb );
FlippableIcon fpA = new FlippableIcon( firstTaughtIcon );
FlippableIcon fpB = new FlippableIcon( secondTaughtIcon );
fpA = new FlippableIcon( defa );
fpB = new FlippableIcon( defb );
fpA = new FlippableIcon( firstTaughtIcon );
fpB = new FlippableIcon( secondTaughtIcon );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
@@ -337,11 +337,11 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, defa, defa, offa, offa );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, defb, defb, offb, offb );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default:
@@ -85,12 +85,12 @@ public class PartDenseCable extends PartCable
GL11.glTranslated( -0.0, -0.0, 0.3 );
rh.setBounds( 4.0f, 4.0f, 2.0f, 12.0f, 12.0f, 14.0f );
float offu = 0;
float offv = 9;
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -99,11 +99,11 @@ public class PartDenseCable extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
offu = 9;
offv = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offu, offv );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offu, offv );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offu, offv );
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -227,22 +227,22 @@ public class PartDenseCable extends PartCable
public void renderDenseConnection(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer, int channels, ForgeDirection of)
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + of.offsetX, y + of.offsetY, z + of.offsetZ );
IPartHost ccph = te instanceof IPartHost ? (IPartHost) te : null;
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
/*
* ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && ccph.getPart(
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = ccph.getColor() ) );
* } else if ( ccph == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart(
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
* } else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
* z, renderer );
*
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon defa = new TaughtIcon( getChannelTex(
* channels, false ).getIcon(), -0.2f ); IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon firstIcon = new TaughtIcon( getChannelTex(
* channels, false ).getIcon(), -0.2f ); IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
* -0.2f );
*
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
@@ -250,11 +250,11 @@ public class PartDenseCable extends PartCable
* false, true ); }
*
* Tessellator.instance.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.instance.setColorOpaque_I(
* myColor.mediumVariant ); rh.setTexture( defa, defa, defa, defa, defa, defa ); renderAllFaces( (AEBaseBlock)
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock)
* rh.getBlock(), x, y, z, renderer );
*
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( defb, defb, defb, defb, defb,
* defb ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
* Tessellator.instance.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
*
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
@@ -263,9 +263,9 @@ public class PartDenseCable extends PartCable
*/
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of, of.getOpposite() ) ) );
if ( ghh != null && ccph != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && ccph.getColor() != AEColor.Transparent
&& ccph.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( myColor = ccph.getColor() ) );
if ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) != AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getTexture( getCableColor() ) );
@@ -300,16 +300,16 @@ public class PartDenseCable extends PartCable
{
setSmartConnectionRotations( of, renderer );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( defa, defa, defa, defa, defa, defa );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( defb, defb, defb, defb, defb, defb );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -339,7 +339,7 @@ public class PartDenseCable extends PartCable
if ( isDense( of ) )
renderDenseConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
else if ( isSmart( of ) )
renderSmartConection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
else
renderCoveredConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
}
@@ -362,11 +362,11 @@ public class PartDenseCable extends PartCable
IIcon def = getTexture( getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon defa = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon offa = new OffsetIcon( defa, 0, -12 );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffset = new OffsetIcon( firstIcon, 0, -12 );
IIcon defb = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon offb = new OffsetIcon( defb, 0, -12 );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffset = new OffsetIcon( secondIcon, 0, -12 );
switch (selectedSide)
{
@@ -384,11 +384,11 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( defa, defa, offa, offa, offa, offa );
rh.setTexture( firstIcon, firstIcon, firstOffset, firstOffset, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( defb, defb, offb, offb, offb, offb );
rh.setTexture( secondIcon, secondIcon, secondOffset, secondOffset, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
@@ -410,21 +410,18 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
FlippableIcon fpA = new FlippableIcon( defa );
FlippableIcon fpB = new FlippableIcon( defb );
fpA = new FlippableIcon( defa );
fpB = new FlippableIcon( defb );
FlippableIcon fpA = new FlippableIcon( firstIcon );
FlippableIcon fpB = new FlippableIcon( secondIcon );
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, offa, offa, defa, fpA );
rh.setTexture( firstOffset, firstOffset, firstOffset, firstOffset, firstIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, offb, offb, defb, fpB );
rh.setTexture( secondOffset, secondOffset, secondOffset, secondOffset, secondIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
@@ -441,11 +438,11 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
rh.setTexture( offa, offa, defa, defa, offa, offa );
rh.setTexture( firstOffset, firstOffset, firstIcon, firstIcon, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
rh.setTexture( offb, offb, defb, defb, offb, offb );
rh.setTexture( secondOffset, secondOffset, secondIcon, secondIcon, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default: