final variables and parameters
This commit is contained in:
@@ -70,7 +70,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
private double idleDraw = 1.0;
|
||||
private EntityPlayer owner;
|
||||
|
||||
public AENetworkProxy( IGridProxyable te, String nbtName, ItemStack visual, boolean inWorld )
|
||||
public AENetworkProxy( final IGridProxyable te, final String nbtName, final ItemStack visual, final boolean inWorld )
|
||||
{
|
||||
this.gp = te;
|
||||
this.nbtName = nbtName;
|
||||
@@ -79,12 +79,12 @@ public class AENetworkProxy implements IGridBlock
|
||||
this.validSides = EnumSet.allOf( EnumFacing.class );
|
||||
}
|
||||
|
||||
public void setVisualRepresentation( ItemStack is )
|
||||
public void setVisualRepresentation( final ItemStack is )
|
||||
{
|
||||
this.myRepInstance = is;
|
||||
}
|
||||
|
||||
public void writeToNBT( NBTTagCompound tag )
|
||||
public void writeToNBT( final NBTTagCompound tag )
|
||||
{
|
||||
if( this.node != null )
|
||||
{
|
||||
@@ -92,7 +92,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
}
|
||||
}
|
||||
|
||||
public void setValidSides( EnumSet<EnumFacing> validSides )
|
||||
public void setValidSides( final EnumSet<EnumFacing> validSides )
|
||||
{
|
||||
this.validSides = validSides;
|
||||
if( this.node != null )
|
||||
@@ -132,7 +132,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
// send orientation based directionality to the node.
|
||||
if( this.gp instanceof IOrientable )
|
||||
{
|
||||
IOrientable ori = (IOrientable) this.gp;
|
||||
final IOrientable ori = (IOrientable) this.gp;
|
||||
if( ori.canBeRotated() )
|
||||
{
|
||||
ori.setOrientation( ori.getForward(), ori.getUp() );
|
||||
@@ -154,7 +154,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
return this.node;
|
||||
}
|
||||
|
||||
public void readFromNBT( NBTTagCompound tag )
|
||||
public void readFromNBT( final NBTTagCompound tag )
|
||||
{
|
||||
this.data = tag;
|
||||
if( this.node != null && this.data != null )
|
||||
@@ -174,12 +174,12 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public IPathingGrid getPath() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
IPathingGrid pg = grid.getCache( IPathingGrid.class );
|
||||
final IPathingGrid pg = grid.getCache( IPathingGrid.class );
|
||||
if( pg == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
@@ -200,7 +200,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
IGrid grid = this.node.getGrid();
|
||||
final IGrid grid = this.node.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
@@ -210,12 +210,12 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public ITickManager getTick() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
ITickManager pg = grid.getCache( ITickManager.class );
|
||||
final ITickManager pg = grid.getCache( ITickManager.class );
|
||||
if( pg == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
@@ -225,13 +225,13 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public IStorageGrid getStorage() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
|
||||
IStorageGrid pg = grid.getCache( IStorageGrid.class );
|
||||
final IStorageGrid pg = grid.getCache( IStorageGrid.class );
|
||||
|
||||
if( pg == null )
|
||||
{
|
||||
@@ -243,13 +243,13 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public P2PCache getP2P() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
|
||||
P2PCache pg = grid.getCache( P2PCache.class );
|
||||
final P2PCache pg = grid.getCache( P2PCache.class );
|
||||
|
||||
if( pg == null )
|
||||
{
|
||||
@@ -261,13 +261,13 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public ISecurityGrid getSecurity() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
|
||||
ISecurityGrid sg = grid.getCache( ISecurityGrid.class );
|
||||
final ISecurityGrid sg = grid.getCache( ISecurityGrid.class );
|
||||
|
||||
if( sg == null )
|
||||
{
|
||||
@@ -279,13 +279,13 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public ICraftingGrid getCrafting() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
|
||||
ICraftingGrid sg = grid.getCache( ICraftingGrid.class );
|
||||
final ICraftingGrid sg = grid.getCache( ICraftingGrid.class );
|
||||
|
||||
if( sg == null )
|
||||
{
|
||||
@@ -326,7 +326,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGridNotification( GridNotification notification )
|
||||
public void onGridNotification( final GridNotification notification )
|
||||
{
|
||||
if( this.gp instanceof PartCable )
|
||||
{
|
||||
@@ -335,7 +335,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetworkStatus( IGrid grid, int channelsInUse )
|
||||
public void setNetworkStatus( final IGrid grid, final int channelsInUse )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -364,16 +364,16 @@ public class AENetworkProxy implements IGridBlock
|
||||
return this.myRepInstance;
|
||||
}
|
||||
|
||||
public void setFlags( GridFlags... requireChannel )
|
||||
public void setFlags( final GridFlags... requireChannel )
|
||||
{
|
||||
EnumSet<GridFlags> flags = EnumSet.noneOf( GridFlags.class );
|
||||
final EnumSet<GridFlags> flags = EnumSet.noneOf( GridFlags.class );
|
||||
|
||||
Collections.addAll( flags, requireChannel );
|
||||
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
public void setIdlePowerUsage( double idle )
|
||||
public void setIdlePowerUsage( final double idle )
|
||||
{
|
||||
this.idleDraw = idle;
|
||||
|
||||
@@ -381,10 +381,10 @@ public class AENetworkProxy implements IGridBlock
|
||||
{
|
||||
try
|
||||
{
|
||||
IGrid g = this.getGrid();
|
||||
final IGrid g = this.getGrid();
|
||||
g.postEvent( new MENetworkPowerIdleChange( this.node ) );
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
catch( final GridAccessException e )
|
||||
{
|
||||
// not ready for this yet..
|
||||
}
|
||||
@@ -412,7 +412,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
{
|
||||
return this.getEnergy().isNetworkPowered();
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
catch( final GridAccessException e )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -420,12 +420,12 @@ public class AENetworkProxy implements IGridBlock
|
||||
|
||||
public IEnergyGrid getEnergy() throws GridAccessException
|
||||
{
|
||||
IGrid grid = this.getGrid();
|
||||
final IGrid grid = this.getGrid();
|
||||
if( grid == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
}
|
||||
IEnergyGrid eg = grid.getCache( IEnergyGrid.class );
|
||||
final IEnergyGrid eg = grid.getCache( IEnergyGrid.class );
|
||||
if( eg == null )
|
||||
{
|
||||
throw new GridAccessException();
|
||||
@@ -433,7 +433,7 @@ public class AENetworkProxy implements IGridBlock
|
||||
return eg;
|
||||
}
|
||||
|
||||
public void setOwner( EntityPlayer player )
|
||||
public void setOwner( final EntityPlayer player )
|
||||
{
|
||||
this.owner = player;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user