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
@@ -34,7 +34,7 @@ import appeng.util.Platform;
public class ContainerCondenser extends AEBaseContainer implements IProgressProvider
{
final TileCondenser condenser;
private final TileCondenser condenser;
@GuiSync( 0 )
public long requiredEnergy = 0;
@GuiSync( 1 )
@@ -63,8 +63,8 @@ public class ContainerCondenser extends AEBaseContainer implements IProgressProv
final double requiredEnergy = this.condenser.getRequiredPower();
this.requiredEnergy = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
this.storedPower = (int) this.condenser.storedPower;
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
this.storedPower = (int) this.condenser.getStoredPower();
this.setOutput( (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT ) );
}
super.detectAndSendChanges();
@@ -81,4 +81,14 @@ public class ContainerCondenser extends AEBaseContainer implements IProgressProv
{
return (int) this.requiredEnergy;
}
public CondenserOutput getOutput()
{
return this.output;
}
private void setOutput( final CondenserOutput output )
{
this.output = output;
}
}