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
@@ -102,7 +102,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
@SideOnly( Side.CLIENT )
public void renderInventory( final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.is ), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon() );
rh.setTexture( CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.getItemStack() ), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon() );
rh.setBounds( 3, 3, 15, 13, 13, 16 );
rh.renderInventoryBox( renderer );
@@ -118,7 +118,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
@SideOnly( Side.CLIENT )
public void renderStatic( final BlockPos pos, final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.is ), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon() );
rh.setTexture( CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.getItemStack() ), CableBusTextures.PartImportSides.getIcon(), CableBusTextures.PartImportSides.getIcon() );
rh.setBounds( 4, 4, 14, 12, 12, 16 );
rh.renderBlock( pos, renderer );
@@ -128,7 +128,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
rh.setBounds( 6, 6, 12, 10, 10, 13 );
rh.renderBlock( pos, renderer );
rh.setTexture( CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.is ), CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon() );
rh.setTexture( CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( this.getItemStack() ), CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon() );
rh.setBounds( 6, 6, 11, 10, 10, 12 );
rh.renderBlock( pos, renderer );
@@ -152,7 +152,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
return true;
}
Platform.openGUI( player, this.getHost().getTile(), this.side, GuiBridge.GUI_BUS );
Platform.openGUI( player, this.getHost().getTile(), this.getSide(), GuiBridge.GUI_BUS );
return true;
}
@@ -162,7 +162,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
@Override
public TickingRequest getTickingRequest( final IGridNode node )
{
return new TickingRequest( TickRates.ImportBus.min, TickRates.ImportBus.max, this.getHandler() == null, false );
return new TickingRequest( TickRates.ImportBus.getMin(), TickRates.ImportBus.getMax(), this.getHandler() == null, false );
}
@Override
@@ -174,7 +174,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
@Override
protected TickRateModulation doBusWork()
{
if( !this.proxy.isActive() || !this.canDoBusWork() )
if( !this.getProxy().isActive() || !this.canDoBusWork() )
{
return TickRateModulation.IDLE;
}
@@ -189,15 +189,15 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
try
{
this.itemToSend = this.calculateItemsToSend();
this.itemToSend = Math.min( this.itemToSend, (int) ( 0.01 + this.proxy.getEnergy().extractAEPower( this.itemToSend, Actionable.SIMULATE, PowerMultiplier.CONFIG ) ) );
this.itemToSend = Math.min( this.itemToSend, (int) ( 0.01 + this.getProxy().getEnergy().extractAEPower( this.itemToSend, Actionable.SIMULATE, PowerMultiplier.CONFIG ) ) );
final IMEMonitor<IAEItemStack> inv = this.proxy.getStorage().getItemInventory();
final IEnergyGrid energy = this.proxy.getEnergy();
final IMEMonitor<IAEItemStack> inv = this.getProxy().getStorage().getItemInventory();
final IEnergyGrid energy = this.getProxy().getEnergy();
boolean Configured = false;
for( int x = 0; x < this.availableSlots(); x++ )
{
final IAEItemStack ais = this.config.getAEStackInSlot( x );
final IAEItemStack ais = this.getConfig().getAEStackInSlot( x );
if( ais != null && this.itemToSend > 0 )
{
Configured = true;