Reduce scope of variables
This commit is contained in:
@@ -454,10 +454,9 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
else
|
||||
{
|
||||
IEnergyGrid eg;
|
||||
try
|
||||
{
|
||||
eg = this.gridProxy.getEnergy();
|
||||
IEnergyGrid eg = this.gridProxy.getEnergy();
|
||||
IEnergySource src = this;
|
||||
|
||||
// Base 1, increase by 1 for each card
|
||||
|
||||
@@ -100,10 +100,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
{
|
||||
if( this.cb.requiresDynamicRender )
|
||||
{
|
||||
TileCableBus tcb;
|
||||
try
|
||||
{
|
||||
tcb = (TileCableBus) BlockCableBus.tesrTile.newInstance();
|
||||
TileCableBus tcb = (TileCableBus) BlockCableBus.tesrTile.newInstance();
|
||||
tcb.copyFrom( this );
|
||||
this.getWorldObj().setTileEntity( this.xCoord, this.yCoord, this.zCoord, tcb );
|
||||
}
|
||||
|
||||
@@ -30,10 +30,9 @@ public class TileCableBusTESR extends TileCableBus
|
||||
{
|
||||
if( !this.cb.requiresDynamicRender )
|
||||
{
|
||||
TileCableBus tcb;
|
||||
try
|
||||
{
|
||||
tcb = (TileCableBus) BlockCableBus.noTesrTile.newInstance();
|
||||
TileCableBus tcb = (TileCableBus) BlockCableBus.noTesrTile.newInstance();
|
||||
tcb.copyFrom( this );
|
||||
this.getWorldObj().setTileEntity( this.xCoord, this.yCoord, this.zCoord, tcb );
|
||||
}
|
||||
|
||||
@@ -343,10 +343,9 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
{
|
||||
double stash = 0.0;
|
||||
|
||||
IEnergyGrid eg;
|
||||
try
|
||||
{
|
||||
eg = this.gridProxy.getEnergy();
|
||||
IEnergyGrid eg = this.gridProxy.getEnergy();
|
||||
stash = eg.extractAEPower( amt, mode, PowerMultiplier.ONE );
|
||||
if( stash >= amt )
|
||||
{
|
||||
@@ -950,7 +949,6 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
{
|
||||
if( TileChest.this.getTile() instanceof IActionHost && requiredPermission != null )
|
||||
{
|
||||
boolean requirePower = false;
|
||||
|
||||
IGridNode gn = ( (IActionHost) TileChest.this.getTile() ).getActionableNode();
|
||||
if( gn != null )
|
||||
@@ -958,6 +956,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
IGrid g = gn.getGrid();
|
||||
if( g != null )
|
||||
{
|
||||
boolean requirePower = false;
|
||||
if( requirePower )
|
||||
{
|
||||
IEnergyGrid eg = g.getCache( IEnergyGrid.class );
|
||||
|
||||
@@ -205,7 +205,6 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
|
||||
private void recalculateDisplay()
|
||||
{
|
||||
int oldState = 0;
|
||||
|
||||
boolean currentActive = this.gridProxy.isActive();
|
||||
if( currentActive )
|
||||
@@ -235,6 +234,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
this.state |= ( this.getCellStatus( x ) << ( 3 * x ) );
|
||||
}
|
||||
|
||||
int oldState = 0;
|
||||
if( oldState != this.state )
|
||||
{
|
||||
this.markForUpdate();
|
||||
|
||||
Reference in New Issue
Block a user