Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -71,15 +71,15 @@ public class PartCable extends AEBasePart implements IPartCable
public PartCable(Class c, ItemStack is) {
super( c, is );
proxy.setFlags( GridFlags.PREFERRED );
proxy.setIdlePowerUsage( 0.0 );
proxy.myColor = AEColor.values()[((ItemMultiPart) is.getItem()).variantOf( is.getItemDamage() )];
this.proxy.setFlags( GridFlags.PREFERRED );
this.proxy.setIdlePowerUsage( 0.0 );
this.proxy.myColor = AEColor.values()[((ItemMultiPart) is.getItem()).variantOf( is.getItemDamage() )];
}
@Override
public boolean isConnected(ForgeDirection side)
{
return connections.contains( side );
return this.connections.contains( side );
}
@Override
@@ -132,7 +132,7 @@ public class PartCable extends AEBasePart implements IPartCable
public IIcon getTexture(AEColor c)
{
return getGlassTexture( c );
return this.getGlassTexture( c );
}
public IIcon getCoveredTexture(AEColor c)
@@ -222,7 +222,7 @@ public class PartCable extends AEBasePart implements IPartCable
@Override
public AEColor getCableColor()
{
return proxy.myColor;
return this.proxy.myColor;
}
@Override
@@ -234,12 +234,12 @@ public class PartCable extends AEBasePart implements IPartCable
@Override
public AENetworkProxy getProxy()
{
return proxy;
return this.proxy;
}
public void markForUpdate()
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
@Override
@@ -249,7 +249,7 @@ public class PartCable extends AEBasePart implements IPartCable
if ( Platform.isServer() )
{
IGridNode node = getGridNode();
IGridNode node = this.getGridNode();
int howMany = 0;
if ( node != null )
@@ -269,12 +269,12 @@ public class PartCable extends AEBasePart implements IPartCable
int cs = 0;
int sideOut = 0;
IGridNode n = getGridNode();
IGridNode n = this.getGridNode();
if ( n != null )
{
for (ForgeDirection thisSide : ForgeDirection.VALID_DIRECTIONS)
{
IPart part = getHost().getPart( thisSide );
IPart part = this.getHost().getPart( thisSide );
if ( part != null )
{
if ( part.getGridNode() != null )
@@ -282,7 +282,7 @@ public class PartCable extends AEBasePart implements IPartCable
IReadOnlyCollection<IGridConnection> set = part.getGridNode().getConnections();
for (IGridConnection gc : set)
{
if ( proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY ) && gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY ) )
if ( this.proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY ) && gc.getOtherSide( this.proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY ) )
sideOut |= (gc.getUsedChannels() / 4) << (4 * thisSide.ordinal());
else
sideOut |= (gc.getUsedChannels()) << (4 * thisSide.ordinal());
@@ -296,8 +296,8 @@ public class PartCable extends AEBasePart implements IPartCable
ForgeDirection side = gc.getDirection( n );
if ( side != ForgeDirection.UNKNOWN )
{
boolean isTier2a = proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY );
boolean isTier2b = gc.getOtherSide( proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY );
boolean isTier2a = this.proxy.getNode().hasFlag( GridFlags.DENSE_CAPACITY );
boolean isTier2b = gc.getOtherSide( this.proxy.getNode() ).hasFlag( GridFlags.DENSE_CAPACITY );
if ( isTier2a && isTier2b )
sideOut |= (gc.getUsedChannels() / 4) << (4 * side.ordinal());
@@ -310,7 +310,7 @@ public class PartCable extends AEBasePart implements IPartCable
try
{
if ( proxy.getEnergy().isNetworkPowered() )
if ( this.proxy.getEnergy().isNetworkPowered() )
cs |= (1 << ForgeDirection.UNKNOWN.ordinal());
}
catch (GridAccessException e)
@@ -328,9 +328,9 @@ public class PartCable extends AEBasePart implements IPartCable
int cs = data.readByte();
int sideOut = data.readInt();
EnumSet<ForgeDirection> myC = connections.clone();
boolean wasPowered = powered;
powered = false;
EnumSet<ForgeDirection> myC = this.connections.clone();
boolean wasPowered = this.powered;
this.powered = false;
boolean channelsChanged = false;
for (ForgeDirection d : ForgeDirection.values())
@@ -338,10 +338,10 @@ public class PartCable extends AEBasePart implements IPartCable
if ( d != ForgeDirection.UNKNOWN )
{
int ch = (sideOut >> (d.ordinal() * 4)) & 0xF;
if ( ch != channelsOnSide[d.ordinal()] )
if ( ch != this.channelsOnSide[d.ordinal()] )
{
channelsChanged = true;
channelsOnSide[d.ordinal()] = ch;
this.channelsOnSide[d.ordinal()] = ch;
}
}
@@ -349,19 +349,19 @@ public class PartCable extends AEBasePart implements IPartCable
{
int id = 1 << d.ordinal();
if ( id == (cs & id) )
powered = true;
this.powered = true;
}
else
{
int id = 1 << d.ordinal();
if ( id == (cs & id) )
connections.add( d );
this.connections.add( d );
else
connections.remove( d );
this.connections.remove( d );
}
}
return !myC.equals( connections ) || wasPowered != powered || channelsChanged;
return !myC.equals( this.connections ) || wasPowered != this.powered || channelsChanged;
}
@Override
@@ -371,14 +371,14 @@ public class PartCable extends AEBasePart implements IPartCable
if ( Platform.isServer() )
{
IGridNode n = getGridNode();
IGridNode n = this.getGridNode();
if ( n != null )
connections = n.getConnectedSides();
this.connections = n.getConnectedSides();
else
connections.clear();
this.connections.clear();
}
IPartHost ph = getHost();
IPartHost ph = this.getHost();
if ( ph != null )
{
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
@@ -417,7 +417,7 @@ public class PartCable extends AEBasePart implements IPartCable
}
}
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
switch (of)
{
@@ -450,7 +450,7 @@ public class PartCable extends AEBasePart implements IPartCable
{
GL11.glTranslated( -0.0, -0.0, 0.3 );
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
rh.setBounds( 6.0f, 6.0f, 2.0f, 10.0f, 10.0f, 14.0f );
rh.renderInventoryBox( renderer );
rh.setTexture( null );
@@ -460,7 +460,7 @@ public class PartCable extends AEBasePart implements IPartCable
@SideOnly(Side.CLIENT)
public IIcon getBreakingTexture()
{
return getTexture( getCableColor() );
return this.getTexture( this.getCableColor() );
}
@SideOnly(Side.CLIENT)
@@ -474,10 +474,10 @@ public class PartCable extends AEBasePart implements IPartCable
if ( gh != null && partHost != null && gh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getColor() != AEColor.Transparent
&& partHost.getPart( of.getOpposite() ) == null )
rh.setTexture( getTexture( partHost.getColor() ) );
rh.setTexture( this.getTexture( partHost.getColor() ) );
else if ( partHost == null && gh != null && gh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
rh.setTexture( this.getCoveredTexture( this.getCableColor() ) );
switch (of)
{
case DOWN:
@@ -503,10 +503,10 @@ public class PartCable extends AEBasePart implements IPartCable
}
rh.renderBlock( x, y, z, renderer );
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
}
else
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
switch (of)
{
@@ -538,7 +538,7 @@ public class PartCable extends AEBasePart implements IPartCable
protected CableBusTextures getChannelTex(int i, boolean b)
{
if ( !powered )
if ( !this.powered )
i = 0;
if ( b )
@@ -586,10 +586,10 @@ public class PartCable extends AEBasePart implements IPartCable
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
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() ) );
rh.setTexture( this.getGlassTexture( partHost.getColor() ) );
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
rh.setTexture( this.getCoveredTexture( this.getCableColor() ) );
switch (of)
{
case DOWN:
@@ -616,18 +616,18 @@ public class PartCable extends AEBasePart implements IPartCable
rh.renderBlock( x, y, z, renderer );
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
}
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() ) );
rh.setTexture( this.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() ) );
rh.setTexture( this.getSmartTexture( this.getCableColor() ) );
}
else
rh.setTexture( getCoveredTexture( getCableColor() ) );
rh.setTexture( this.getCoveredTexture( this.getCableColor() ) );
switch (of)
{
@@ -658,9 +658,9 @@ public class PartCable extends AEBasePart implements IPartCable
if ( isSmart )
{
setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
this.setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -670,13 +670,13 @@ public class PartCable extends AEBasePart implements IPartCable
}
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
@@ -691,7 +691,7 @@ public class PartCable extends AEBasePart implements IPartCable
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
AEColor myColor = this.getCableColor();
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of ) ) );
@@ -699,11 +699,11 @@ public class PartCable extends AEBasePart implements IPartCable
&& partHost.getColor() != AEColor.Transparent )
{
isGlass = true;
rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
rh.setTexture( this.getGlassTexture( myColor = partHost.getColor() ) );
}
else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of.getOpposite() ) != AECableType.GLASS )
{
rh.setTexture( getSmartTexture( myColor ) );
rh.setTexture( this.getSmartTexture( myColor ) );
switch (of)
{
case DOWN:
@@ -729,9 +729,9 @@ public class PartCable extends AEBasePart implements IPartCable
}
rh.renderBlock( x, y, z, renderer );
setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
this.setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -743,22 +743,22 @@ public class PartCable extends AEBasePart implements IPartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
}
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() ) );
rh.setTexture( this.getSmartTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getSmartTexture( getCableColor() ) );
rh.setTexture( this.getSmartTexture( this.getCableColor() ) );
switch (of)
{
@@ -789,19 +789,19 @@ public class PartCable extends AEBasePart implements IPartCable
if ( !isGlass )
{
setSmartConnectionRotations( of, renderer );
this.setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
@@ -861,13 +861,13 @@ public class PartCable extends AEBasePart implements IPartCable
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
boolean useCovered = false;
boolean requireDetailed = false;
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
IPart p = getHost().getPart( dir );
IPart p = this.getHost().getPart( dir );
if ( p != null && p instanceof IGridHost )
{
IGridHost igh = (IGridHost) p;
@@ -878,7 +878,7 @@ public class PartCable extends AEBasePart implements IPartCable
break;
}
}
else if ( connections.contains( dir ) )
else if ( this.connections.contains( dir ) )
{
TileEntity te = this.tile.getWorldObj().getTileEntity( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ );
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
@@ -890,15 +890,15 @@ public class PartCable extends AEBasePart implements IPartCable
if ( useCovered )
{
rh.setTexture( getCoveredTexture( getCableColor() ) );
rh.setTexture( this.getCoveredTexture( this.getCableColor() ) );
}
else
{
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
}
IPartHost ph = getHost();
for (ForgeDirection of : EnumSet.complementOf( connections ))
IPartHost ph = this.getHost();
for (ForgeDirection of : EnumSet.complementOf( this.connections ))
{
IPart bp = ph.getPart( of );
if ( bp instanceof IGridHost )
@@ -934,7 +934,7 @@ public class PartCable extends AEBasePart implements IPartCable
}
}
if ( connections.size() != 2 || !nonLinear( connections ) || useCovered || requireDetailed )
if ( this.connections.size() != 2 || !this.nonLinear( this.connections ) || useCovered || requireDetailed )
{
if ( useCovered )
{
@@ -947,17 +947,17 @@ public class PartCable extends AEBasePart implements IPartCable
rh.renderBlock( x, y, z, renderer );
}
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
renderGlassConnection( x, y, z, rh, renderer, of );
this.renderGlassConnection( x, y, z, rh, renderer, of );
}
}
else
{
IIcon def = getTexture( getCableColor() );
IIcon def = this.getTexture( this.getCableColor() );
rh.setTexture( def );
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of, of.getOpposite() ) ) );
switch (of)
@@ -991,24 +991,24 @@ public class PartCable extends AEBasePart implements IPartCable
@Override
public boolean changeColor(AEColor newColor, EntityPlayer who)
{
if ( getCableColor() != newColor )
if ( this.getCableColor() != newColor )
{
ItemStack newPart = null;
if ( getCableConnectionType() == AECableType.GLASS )
if ( this.getCableConnectionType() == AECableType.GLASS )
newPart = AEApi.instance().parts().partCableGlass.stack( newColor, 1 );
else if ( getCableConnectionType() == AECableType.COVERED )
else if ( this.getCableConnectionType() == AECableType.COVERED )
newPart = AEApi.instance().parts().partCableCovered.stack( newColor, 1 );
else if ( getCableConnectionType() == AECableType.SMART )
else if ( this.getCableConnectionType() == AECableType.SMART )
newPart = AEApi.instance().parts().partCableSmart.stack( newColor, 1 );
else if ( getCableConnectionType() == AECableType.DENSE )
else if ( this.getCableConnectionType() == AECableType.DENSE )
newPart = AEApi.instance().parts().partCableDense.stack( newColor, 1 );
boolean hasPermission = true;
try
{
hasPermission = proxy.getSecurity().hasPermission( who, SecurityPermissions.BUILD );
hasPermission = this.proxy.getSecurity().hasPermission( who, SecurityPermissions.BUILD );
}
catch (GridAccessException e)
{
@@ -1020,8 +1020,8 @@ public class PartCable extends AEBasePart implements IPartCable
if ( Platform.isClient() )
return true;
getHost().removePart( ForgeDirection.UNKNOWN, true );
getHost().addPart( newPart, ForgeDirection.UNKNOWN, who );
this.getHost().removePart( ForgeDirection.UNKNOWN, true );
this.getHost().addPart( newPart, ForgeDirection.UNKNOWN, who );
return true;
}
}
@@ -1031,7 +1031,7 @@ public class PartCable extends AEBasePart implements IPartCable
@Override
public void setValidSides(EnumSet<ForgeDirection> sides)
{
proxy.setValidSides( sides );
this.proxy.setValidSides( sides );
}
protected boolean nonLinear(EnumSet<ForgeDirection> sides)
@@ -49,13 +49,13 @@ public class PartCableCovered extends PartCable
@MENetworkEventSubscribe
public void channelUpdated(MENetworkChannelsChanged c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
@MENetworkEventSubscribe
public void powerRender(MENetworkPowerStatusChange c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
public PartCableCovered(Class c, ItemStack is) {
@@ -69,7 +69,7 @@ public class PartCableCovered extends PartCable
@Override
public IIcon getTexture(AEColor c)
{
return getCoveredTexture( c );
return this.getCoveredTexture( c );
}
@Override
@@ -85,14 +85,14 @@ public class PartCableCovered extends PartCable
if ( Platform.isServer() )
{
IGridNode n = getGridNode();
IGridNode n = this.getGridNode();
if ( n != null )
connections = n.getConnectedSides();
this.connections = n.getConnectedSides();
else
connections.clear();
this.connections.clear();
}
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
switch (of)
{
@@ -129,7 +129,7 @@ public class PartCableCovered extends PartCable
float offU = 0;
float offV = 9;
OffsetIcon main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
OffsetIcon main = new OffsetIcon( this.getTexture( this.getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -138,14 +138,14 @@ public class PartCableCovered extends PartCable
offU = 9;
offV = 0;
main = new OffsetIcon( getTexture( getCableColor() ), offU, offV );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
rh.renderInventoryFace( main, side, renderer );
}
main = new OffsetIcon( getTexture( getCableColor() ), 0, 0 );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), 0, 0 );
for (ForgeDirection side : EnumSet.of( ForgeDirection.SOUTH, ForgeDirection.NORTH ))
{
@@ -159,14 +159,14 @@ public class PartCableCovered extends PartCable
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
rh.setTexture( getTexture( getCableColor() ) );
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
rh.setTexture( this.getTexture( this.getCableColor() ) );
EnumSet<ForgeDirection> sides = connections.clone();
EnumSet<ForgeDirection> sides = this.connections.clone();
boolean hasBuses = false;
IPartHost ph = getHost();
for (ForgeDirection of : EnumSet.complementOf( connections ))
IPartHost ph = this.getHost();
for (ForgeDirection of : EnumSet.complementOf( this.connections ))
{
IPart bp = ph.getPart( of );
if ( bp instanceof IGridHost )
@@ -208,22 +208,22 @@ public class PartCableCovered extends PartCable
}
}
if ( sides.size() != 2 || !nonLinear( sides ) || hasBuses )
if ( sides.size() != 2 || !this.nonLinear( sides ) || hasBuses )
{
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
renderCoveredConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
this.renderCoveredConnection( x, y, z, rh, renderer, this.channelsOnSide[of.ordinal()], of );
}
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
rh.setBounds( 5, 5, 5, 11, 11, 11 );
rh.renderBlock( x, y, z, renderer );
}
else
{
IIcon def = getTexture( getCableColor() );
IIcon def = this.getTexture( this.getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
switch (of)
{
@@ -53,13 +53,13 @@ public class PartCableSmart extends PartCable
@MENetworkEventSubscribe
public void channelUpdated(MENetworkChannelsChanged c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
@MENetworkEventSubscribe
public void powerRender(MENetworkPowerStatusChange c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
public PartCableSmart(Class c, ItemStack is) {
@@ -79,7 +79,7 @@ public class PartCableSmart extends PartCable
@Override
public IIcon getTexture(AEColor c)
{
return getSmartTexture( c );
return this.getSmartTexture( c );
}
@Override
@@ -91,9 +91,9 @@ public class PartCableSmart extends PartCable
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( this.getTexture( this.getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -105,9 +105,9 @@ public class PartCableSmart extends PartCable
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 );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), offU, offV );
ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -117,9 +117,9 @@ public class PartCableSmart extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
main = new OffsetIcon( getTexture( getCableColor() ), 0, 0 );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), 0, 0 );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), 0, 0 );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), 0, 0 );
ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), 0, 0 );
ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), 0, 0 );
for (ForgeDirection side : EnumSet.of( ForgeDirection.SOUTH, ForgeDirection.NORTH ))
{
@@ -139,14 +139,14 @@ public class PartCableSmart extends PartCable
if ( Platform.isServer() )
{
IGridNode n = getGridNode();
IGridNode n = this.getGridNode();
if ( n != null )
connections = n.getConnectedSides();
this.connections = n.getConnectedSides();
else
connections.clear();
this.connections.clear();
}
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
switch (of)
{
@@ -177,14 +177,14 @@ public class PartCableSmart extends PartCable
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
rh.setTexture( getTexture( getCableColor() ) );
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
rh.setTexture( this.getTexture( this.getCableColor() ) );
EnumSet<ForgeDirection> sides = connections.clone();
EnumSet<ForgeDirection> sides = this.connections.clone();
boolean hasBuses = false;
IPartHost ph = getHost();
for (ForgeDirection of : EnumSet.complementOf( connections ))
IPartHost ph = this.getHost();
for (ForgeDirection of : EnumSet.complementOf( this.connections ))
{
IPart bp = ph.getPart( of );
if ( bp instanceof IGridHost )
@@ -223,9 +223,9 @@ public class PartCableSmart extends PartCable
}
rh.renderBlock( x, y, z, renderer );
setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
this.setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( this.channelsOnSide[of.ordinal()], false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( this.channelsOnSide[of.ordinal()], true ).getIcon(), -0.2f );
if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST )
{
@@ -235,29 +235,29 @@ public class PartCableSmart extends PartCable
}
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
}
}
}
if ( sides.size() != 2 || !nonLinear( sides ) || hasBuses )
if ( sides.size() != 2 || !this.nonLinear( sides ) || hasBuses )
{
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
this.renderSmartConnection( x, y, z, rh, renderer, this.channelsOnSide[of.ordinal()], of );
}
rh.setTexture( getCoveredTexture( getCableColor() ) );
rh.setTexture( this.getCoveredTexture( this.getCableColor() ) );
rh.setBounds( 5, 5, 5, 11, 11, 11 );
rh.renderBlock( x, y, z, renderer );
}
@@ -265,20 +265,20 @@ public class PartCableSmart extends PartCable
{
ForgeDirection selectedSide = ForgeDirection.UNKNOWN;
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
selectedSide = of;
break;
}
int channels = channelsOnSide[selectedSide.ordinal()];
IIcon def = getTexture( getCableColor() );
int channels = this.channelsOnSide[selectedSide.ordinal()];
IIcon def = this.getTexture( this.getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstTaughtIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 );
IIcon secondTaughtIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondTaughtIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffsetIcon = new OffsetIcon( secondTaughtIcon, 0, -12 );
switch (selectedSide)
@@ -296,13 +296,13 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
case WEST:
@@ -332,13 +332,13 @@ public class PartCableSmart extends PartCable
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
case SOUTH:
@@ -353,13 +353,13 @@ public class PartCableSmart extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstOffsetIcon, firstOffsetIcon, firstTaughtIcon, firstTaughtIcon, firstOffsetIcon, firstOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondOffsetIcon, secondOffsetIcon, secondTaughtIcon, secondTaughtIcon, secondOffsetIcon, secondOffsetIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default:
break;
@@ -63,18 +63,18 @@ public class PartDenseCable extends PartCable
@MENetworkEventSubscribe
public void channelUpdated(MENetworkChannelsChanged c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
@MENetworkEventSubscribe
public void powerRender(MENetworkPowerStatusChange c)
{
getHost().markForUpdate();
this.getHost().markForUpdate();
}
public PartDenseCable(Class c, ItemStack is) {
super( c, is );
proxy.setFlags( GridFlags.DENSE_CAPACITY, GridFlags.PREFERRED );
this.proxy.setFlags( GridFlags.DENSE_CAPACITY, GridFlags.PREFERRED );
}
public PartDenseCable(ItemStack is) {
@@ -93,7 +93,7 @@ public class PartDenseCable extends PartCable
if ( c == AEColor.Transparent )
return AEApi.instance().parts().partCableSmart.stack( AEColor.Transparent, 1 ).getIconIndex();
return getSmartTexture( c );
return this.getSmartTexture( c );
}
@Override
@@ -106,9 +106,9 @@ public class PartDenseCable extends PartCable
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( this.getTexture( this.getCableColor() ), offU, offV );
OffsetIcon ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), offU, offV );
OffsetIcon ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.UP, ForgeDirection.DOWN ))
{
@@ -119,9 +119,9 @@ public class PartDenseCable extends PartCable
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 );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), offU, offV );
ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), offU, offV );
ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), offU, offV );
for (ForgeDirection side : EnumSet.of( ForgeDirection.EAST, ForgeDirection.WEST ))
{
@@ -130,9 +130,9 @@ public class PartDenseCable extends PartCable
rh.renderInventoryFace( ch2, side, renderer );
}
main = new OffsetIcon( getTexture( getCableColor() ), 0, 0 );
ch1 = new OffsetIcon( getChannelTex( 4, false ).getIcon(), 0, 0 );
ch2 = new OffsetIcon( getChannelTex( 4, true ).getIcon(), 0, 0 );
main = new OffsetIcon( this.getTexture( this.getCableColor() ), 0, 0 );
ch1 = new OffsetIcon( this.getChannelTex( 4, false ).getIcon(), 0, 0 );
ch2 = new OffsetIcon( this.getChannelTex( 4, true ).getIcon(), 0, 0 );
for (ForgeDirection side : EnumSet.of( ForgeDirection.SOUTH, ForgeDirection.NORTH ))
{
@@ -155,16 +155,16 @@ public class PartDenseCable extends PartCable
if ( Platform.isServer() )
{
IGridNode n = getGridNode();
IGridNode n = this.getGridNode();
if ( n != null )
connections = n.getConnectedSides();
this.connections = n.getConnectedSides();
else
connections.clear();
this.connections.clear();
}
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
if ( isDense( of ) )
if ( this.isDense( of ) )
{
switch (of)
{
@@ -219,7 +219,7 @@ public class PartDenseCable extends PartCable
private boolean isDense(ForgeDirection of)
{
TileEntity te = tile.getWorldObj().getTileEntity( tile.xCoord + of.offsetX, tile.yCoord + of.offsetY, tile.zCoord + of.offsetZ );
TileEntity te = this.tile.getWorldObj().getTileEntity( this.tile.xCoord + of.offsetX, this.tile.yCoord + of.offsetY, this.tile.zCoord + of.offsetZ );
if ( te instanceof IGridHost )
{
AECableType t = ((IGridHost) te).getCableConnectionType( of.getOpposite() );
@@ -230,7 +230,7 @@ public class PartDenseCable extends PartCable
private boolean isSmart(ForgeDirection of)
{
TileEntity te = tile.getWorldObj().getTileEntity( tile.xCoord + of.offsetX, tile.yCoord + of.offsetY, tile.zCoord + of.offsetZ );
TileEntity te = this.tile.getWorldObj().getTileEntity( this.tile.xCoord + of.offsetX, this.tile.yCoord + of.offsetY, this.tile.zCoord + of.offsetZ );
if ( te instanceof IGridHost )
{
AECableType t = ((IGridHost) te).getCableConnectionType( of.getOpposite() );
@@ -246,7 +246,7 @@ public class PartDenseCable extends PartCable
IPartHost partHost = te instanceof IPartHost ? (IPartHost) te : null;
IGridHost ghh = te instanceof IGridHost ? (IGridHost) te : null;
boolean isGlass = false;
AEColor myColor = getCableColor();
AEColor myColor = this.getCableColor();
/*
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart(
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
@@ -281,9 +281,9 @@ public class PartDenseCable extends PartCable
rh.setFacesToRender( EnumSet.complementOf( EnumSet.of( of, of.getOpposite() ) ) );
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() ) );
rh.setTexture( this.getTexture( myColor = partHost.getColor() ) );
else
rh.setTexture( getTexture( getCableColor() ) );
rh.setTexture( this.getTexture( this.getCableColor() ) );
switch (of)
{
@@ -314,19 +314,19 @@ public class PartDenseCable extends PartCable
rh.setFacesToRender( EnumSet.allOf( ForgeDirection.class ) );
if ( !isGlass )
{
setSmartConnectionRotations( of, renderer );
this.setSmartConnectionRotations( of, renderer );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( myColor.blackVariant );
rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( myColor.whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
@@ -336,31 +336,31 @@ public class PartDenseCable extends PartCable
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
rh.setTexture( getTexture( getCableColor() ) );
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
rh.setTexture( this.getTexture( this.getCableColor() ) );
EnumSet<ForgeDirection> sides = connections.clone();
EnumSet<ForgeDirection> sides = this.connections.clone();
boolean hasBuses = false;
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
if ( !isDense( of ) )
if ( !this.isDense( of ) )
hasBuses = true;
}
if ( sides.size() != 2 || !nonLinear( sides ) || hasBuses )
if ( sides.size() != 2 || !this.nonLinear( sides ) || hasBuses )
{
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
if ( isDense( of ) )
renderDenseConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
else if ( isSmart( of ) )
renderSmartConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
if ( this.isDense( of ) )
this.renderDenseConnection( x, y, z, rh, renderer, this.channelsOnSide[of.ordinal()], of );
else if ( this.isSmart( of ) )
this.renderSmartConnection( x, y, z, rh, renderer, this.channelsOnSide[of.ordinal()], of );
else
renderCoveredConnection( x, y, z, rh, renderer, channelsOnSide[of.ordinal()], of );
this.renderCoveredConnection( x, y, z, rh, renderer, this.channelsOnSide[of.ordinal()], of );
}
rh.setTexture( getDenseTexture( getCableColor() ) );
rh.setTexture( this.getDenseTexture( this.getCableColor() ) );
rh.setBounds( 3, 3, 3, 13, 13, 13 );
rh.renderBlock( x, y, z, renderer );
}
@@ -368,20 +368,20 @@ public class PartDenseCable extends PartCable
{
ForgeDirection selectedSide = ForgeDirection.UNKNOWN;
for (ForgeDirection of : connections)
for (ForgeDirection of : this.connections)
{
selectedSide = of;
break;
}
int channels = channelsOnSide[selectedSide.ordinal()];
IIcon def = getTexture( getCableColor() );
int channels = this.channelsOnSide[selectedSide.ordinal()];
IIcon def = this.getTexture( this.getCableColor() );
IIcon off = new OffsetIcon( def, 0, -12 );
IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstIcon = new TaughtIcon( this.getChannelTex( channels, false ).getIcon(), -0.2f );
IIcon firstOffset = new OffsetIcon( firstIcon, 0, -12 );
IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondIcon = new TaughtIcon( this.getChannelTex( channels, true ).getIcon(), -0.2f );
IIcon secondOffset = new OffsetIcon( secondIcon, 0, -12 );
switch (selectedSide)
@@ -399,13 +399,13 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstIcon, firstIcon, firstOffset, firstOffset, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondIcon, secondIcon, secondOffset, secondOffset, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case EAST:
case WEST:
@@ -432,13 +432,13 @@ public class PartDenseCable extends PartCable
fpA.setFlip( true, false );
fpB.setFlip( true, false );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstOffset, firstOffset, firstOffset, firstOffset, firstIcon, fpA );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondOffset, secondOffset, secondOffset, secondOffset, secondIcon, fpB );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
case NORTH:
case SOUTH:
@@ -453,13 +453,13 @@ public class PartDenseCable extends PartCable
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
Tessellator.instance.setColorOpaque_I( getCableColor().blackVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().blackVariant );
rh.setTexture( firstOffset, firstOffset, firstIcon, firstIcon, firstOffset, firstOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
Tessellator.instance.setColorOpaque_I( getCableColor().whiteVariant );
Tessellator.instance.setColorOpaque_I( this.getCableColor().whiteVariant );
rh.setTexture( secondOffset, secondOffset, secondIcon, secondIcon, secondOffset, secondOffset );
renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
this.renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer );
break;
default:
break;
@@ -509,6 +509,6 @@ public class PartDenseCable extends PartCable
default:
}
return is.getIconIndex();
return this.is.getIconIndex();
}
}
@@ -49,62 +49,62 @@ import cpw.mods.fml.relauncher.SideOnly;
public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
{
final AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", proxy.getMachineRepresentation(), true );
final AENetworkProxy outerProxy = new AENetworkProxy( this, "outer", this.proxy.getMachineRepresentation(), true );
public PartQuartzFiber(ItemStack is) {
super( PartQuartzFiber.class, is );
proxy.setIdlePowerUsage( 0 );
proxy.setFlags( GridFlags.CANNOT_CARRY );
outerProxy.setIdlePowerUsage( 0 );
outerProxy.setFlags( GridFlags.CANNOT_CARRY );
this.proxy.setIdlePowerUsage( 0 );
this.proxy.setFlags( GridFlags.CANNOT_CARRY );
this.outerProxy.setIdlePowerUsage( 0 );
this.outerProxy.setFlags( GridFlags.CANNOT_CARRY );
}
@Override
public void onPlacement(EntityPlayer player, ItemStack held, ForgeDirection side)
{
super.onPlacement( player, held, side );
outerProxy.setOwner( player );
this.outerProxy.setOwner( player );
}
@Override
public void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile)
{
super.setPartHostInfo( side, host, tile );
outerProxy.setValidSides( EnumSet.of( side ) );
this.outerProxy.setValidSides( EnumSet.of( side ) );
}
@Override
public void readFromNBT(NBTTagCompound extra)
{
super.readFromNBT( extra );
outerProxy.readFromNBT( extra );
this.outerProxy.readFromNBT( extra );
}
@Override
public void writeToNBT(NBTTagCompound extra)
{
super.writeToNBT( extra );
outerProxy.writeToNBT( extra );
this.outerProxy.writeToNBT( extra );
}
@Override
public void addToWorld()
{
super.addToWorld();
outerProxy.onReady();
this.outerProxy.onReady();
}
@Override
public void removeFromWorld()
{
super.removeFromWorld();
outerProxy.invalidate();
this.outerProxy.invalidate();
}
@Override
public IGridNode getExternalFacingNode()
{
return outerProxy.getNode();
return this.outerProxy.getNode();
}
@Override
@@ -117,7 +117,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
IIcon myIcon = is.getIconIndex();
IIcon myIcon = this.is.getIconIndex();
rh.setTexture( myIcon );
rh.setBounds( 6, 6, 10, 10, 10, 16 );
rh.renderBlock( x, y, z, renderer );
@@ -136,7 +136,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
{
GL11.glTranslated( -0.2, -0.3, 0.0 );
rh.setTexture( is.getIconIndex() );
rh.setTexture( this.is.getIconIndex() );
rh.setBounds( 6.0f, 6.0f, 5.0f, 10.0f, 10.0f, 11.0f );
rh.renderInventoryBox( renderer );
rh.setTexture( null );
@@ -149,7 +149,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = proxy.getEnergy();
IEnergyGrid eg = this.proxy.getEnergy();
acquiredPower += eg.extractAEPower( amt - acquiredPower, mode, seen );
}
catch (GridAccessException e)
@@ -159,7 +159,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = outerProxy.getEnergy();
IEnergyGrid eg = this.outerProxy.getEnergy();
acquiredPower += eg.extractAEPower( amt - acquiredPower, mode, seen );
}
catch (GridAccessException e)
@@ -176,7 +176,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = proxy.getEnergy();
IEnergyGrid eg = this.proxy.getEnergy();
if ( !seen.contains( eg ) )
return eg.injectAEPower( amt, mode, seen );
}
@@ -187,7 +187,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = outerProxy.getEnergy();
IEnergyGrid eg = this.outerProxy.getEnergy();
if ( !seen.contains( eg ) )
return eg.injectAEPower( amt, mode, seen );
}
@@ -212,7 +212,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = proxy.getEnergy();
IEnergyGrid eg = this.proxy.getEnergy();
demand += eg.getEnergyDemand( amt - demand, seen );
}
catch (GridAccessException e)
@@ -222,7 +222,7 @@ public class PartQuartzFiber extends AEBasePart implements IEnergyGridProvider
try
{
IEnergyGrid eg = outerProxy.getEnergy();
IEnergyGrid eg = this.outerProxy.getEnergy();
demand += eg.getEnergyDemand( amt - demand, seen );
}
catch (GridAccessException e)