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
@@ -32,8 +32,8 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
{
private static final int MAX_BURN_TIME = 200;
public final int aePerTick = 5;
final TileVibrationChamber vibrationChamber;
private final int aePerTick = 5;
private final TileVibrationChamber vibrationChamber;
@GuiSync( 0 )
public int burnProgress = 0;
@GuiSync( 1 )
@@ -44,7 +44,7 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
super( ip, vibrationChamber, null );
this.vibrationChamber = vibrationChamber;
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, this.invPlayer ) );
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, this.getInventoryPlayer() ) );
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
@@ -54,8 +54,8 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
{
if( Platform.isServer() )
{
this.burnProgress = (int) ( this.vibrationChamber.maxBurnTime <= 0 ? 0 : 12 * this.vibrationChamber.burnTime / this.vibrationChamber.maxBurnTime );
this.burnSpeed = this.vibrationChamber.burnSpeed;
this.burnProgress = (int) ( this.vibrationChamber.getMaxBurnTime() <= 0 ? 0 : 12 * this.vibrationChamber.getBurnTime() / this.vibrationChamber.getMaxBurnTime() );
this.burnSpeed = this.vibrationChamber.getBurnSpeed();
}
super.detectAndSendChanges();
@@ -72,4 +72,9 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
{
return MAX_BURN_TIME;
}
public int getAePerTick()
{
return this.aePerTick;
}
}