Reduces visibility of internal fields/methods
Reduces the visibility of all fields to private and create setters/getters when necessary. Exceptions are fields with GuiSync as these need to be public. Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
@@ -107,7 +107,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
@Reflected
|
||||
public TileIOPort()
|
||||
{
|
||||
this.gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL );
|
||||
this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL );
|
||||
this.manager = new ConfigManager( this );
|
||||
this.manager.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.manager.registerSetting( Settings.FULLNESS_MODE, FullnessMode.EMPTY );
|
||||
@@ -159,11 +159,11 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
{
|
||||
if( this.hasWork() )
|
||||
{
|
||||
this.gridProxy.getTick().wakeDevice( this.gridProxy.getNode() );
|
||||
this.getProxy().getTick().wakeDevice( this.getProxy().getNode() );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.gridProxy.getTick().sleepDevice( this.gridProxy.getNode() );
|
||||
this.getProxy().getTick().sleepDevice( this.getProxy().getNode() );
|
||||
}
|
||||
}
|
||||
catch( final GridAccessException e )
|
||||
@@ -182,7 +182,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getRedstoneState()
|
||||
private boolean getRedstoneState()
|
||||
{
|
||||
if( this.lastRedstoneState == YesNo.UNDECIDED )
|
||||
{
|
||||
@@ -235,7 +235,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
this.updateTask();
|
||||
}
|
||||
|
||||
boolean hasWork()
|
||||
private boolean hasWork()
|
||||
{
|
||||
if( this.isEnabled() )
|
||||
{
|
||||
@@ -308,13 +308,13 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
@Override
|
||||
public TickingRequest getTickingRequest( final IGridNode node )
|
||||
{
|
||||
return new TickingRequest( TickRates.IOPort.min, TickRates.IOPort.max, this.hasWork(), false );
|
||||
return new TickingRequest( TickRates.IOPort.getMin(), TickRates.IOPort.getMax(), this.hasWork(), false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest( final IGridNode node, final int ticksSinceLastCall )
|
||||
{
|
||||
if( !this.gridProxy.isActive() )
|
||||
if( !this.getProxy().isActive() )
|
||||
{
|
||||
return TickRateModulation.IDLE;
|
||||
}
|
||||
@@ -336,9 +336,9 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
|
||||
try
|
||||
{
|
||||
final IMEInventory<IAEItemStack> itemNet = this.gridProxy.getStorage().getItemInventory();
|
||||
final IMEInventory<IAEFluidStack> fluidNet = this.gridProxy.getStorage().getFluidInventory();
|
||||
final IEnergySource energy = this.gridProxy.getEnergy();
|
||||
final IMEInventory<IAEItemStack> itemNet = this.getProxy().getStorage().getItemInventory();
|
||||
final IMEInventory<IAEFluidStack> fluidNet = this.getProxy().getStorage().getFluidInventory();
|
||||
final IEnergySource energy = this.getProxy().getEnergy();
|
||||
for( int x = 0; x < 6; x++ )
|
||||
{
|
||||
final ItemStack is = this.cells.getStackInSlot( x );
|
||||
@@ -556,10 +556,10 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
/**
|
||||
* Adds the items in the upgrade slots to the drop list.
|
||||
*
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param drops drops of tile entity
|
||||
*/
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user