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:
yueh
2015-10-08 15:42:42 +02:00
parent f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
@@ -36,13 +36,13 @@ import appeng.tile.inventory.InvOperation;
public class TileEnergyAcceptor extends AENetworkPowerTile
{
static final AppEngInternalInventory INTERNAL_INVENTORY = new AppEngInternalInventory( null, 0 );
final int[] sides = {};
private static final AppEngInternalInventory INTERNAL_INVENTORY = new AppEngInternalInventory( null, 0 );
private final int[] sides = {};
public TileEnergyAcceptor()
{
this.gridProxy.setIdlePowerUsage( 0.0 );
this.internalMaxPower = 0;
this.getProxy().setIdlePowerUsage( 0.0 );
this.setInternalMaxPower( 0 );
}
@Override
@@ -72,12 +72,12 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
{
try
{
final IEnergyGrid grid = this.gridProxy.getEnergy();
final IEnergyGrid grid = this.getProxy().getEnergy();
return grid.getEnergyDemand( maxRequired );
}
catch( final GridAccessException e )
{
return this.internalMaxPower;
return this.getInternalMaxPower();
}
}
@@ -86,7 +86,7 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
{
try
{
final IEnergyGrid grid = this.gridProxy.getEnergy();
final IEnergyGrid grid = this.getProxy().getEnergy();
final double leftOver = grid.injectPower( power, mode );
if( mode == Actionable.SIMULATE )
{