final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
@@ -56,13 +56,13 @@ public class PartCableAnchor implements IPart
IPartHost host = null;
AEPartLocation mySide = AEPartLocation.UP;
public PartCableAnchor( ItemStack is )
public PartCableAnchor( final ItemStack is )
{
this.is = is;
}
@Override
public void getBoxes( IPartCollisionHelper bch )
public void getBoxes( final IPartCollisionHelper bch )
{
if( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
{
@@ -75,14 +75,14 @@ public class PartCableAnchor implements IPart
}
@Override
public ItemStack getItemStack( PartItemStack wrenched )
public ItemStack getItemStack( final PartItemStack wrenched )
{
return this.is;
}
@Override
@SideOnly( Side.CLIENT )
public void renderInventory( IPartRenderHelper instance, ModelGenerator renderer )
public void renderInventory( final IPartRenderHelper instance, final ModelGenerator renderer )
{
instance.setTexture( renderer.getIcon( is ) );
instance.setBounds( 7, 7, 4, 9, 9, 14 );
@@ -92,9 +92,9 @@ public class PartCableAnchor implements IPart
@Override
@SideOnly( Side.CLIENT )
public void renderStatic( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer )
public void renderStatic( final BlockPos pos, final IPartRenderHelper rh, final ModelGenerator renderer )
{
IAESprite myIcon = renderer.getIcon( is );
final IAESprite myIcon = renderer.getIcon( is );
rh.setTexture( myIcon );
if( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
{
@@ -110,13 +110,13 @@ public class PartCableAnchor implements IPart
@Override
@SideOnly( Side.CLIENT )
public void renderDynamic( double x, double y, double z, IPartRenderHelper rh, ModelGenerator renderer )
public void renderDynamic( final double x, final double y, final double z, final IPartRenderHelper rh, final ModelGenerator renderer )
{
}
@Override
public TextureAtlasSprite getBreakingTexture( ModelGenerator renderer)
public TextureAtlasSprite getBreakingTexture( final ModelGenerator renderer)
{
return null;
}
@@ -140,13 +140,13 @@ public class PartCableAnchor implements IPart
}
@Override
public void writeToNBT( NBTTagCompound data )
public void writeToNBT( final NBTTagCompound data )
{
}
@Override
public void readFromNBT( NBTTagCompound data )
public void readFromNBT( final NBTTagCompound data )
{
}
@@ -158,7 +158,7 @@ public class PartCableAnchor implements IPart
}
@Override
public boolean isLadder( EntityLivingBase entity )
public boolean isLadder( final EntityLivingBase entity )
{
return this.mySide.yOffset == 0 && ( entity.isCollidedHorizontally || !entity.onGround );
}
@@ -182,13 +182,13 @@ public class PartCableAnchor implements IPart
}
@Override
public void writeToStream( ByteBuf data ) throws IOException
public void writeToStream( final ByteBuf data ) throws IOException
{
}
@Override
public boolean readFromStream( ByteBuf data ) throws IOException
public boolean readFromStream( final ByteBuf data ) throws IOException
{
return false;
}
@@ -200,7 +200,7 @@ public class PartCableAnchor implements IPart
}
@Override
public void onEntityCollision( Entity entity )
public void onEntityCollision( final Entity entity )
{
}
@@ -224,26 +224,26 @@ public class PartCableAnchor implements IPart
}
@Override
public void setPartHostInfo( AEPartLocation side, IPartHost host, TileEntity tile )
public void setPartHostInfo( final AEPartLocation side, final IPartHost host, final TileEntity tile )
{
this.host = host;
this.mySide = side;
}
@Override
public boolean onActivate( EntityPlayer player, Vec3 pos )
public boolean onActivate( final EntityPlayer player, final Vec3 pos )
{
return false;
}
@Override
public boolean onShiftActivate( EntityPlayer player, Vec3 pos )
public boolean onShiftActivate( final EntityPlayer player, final Vec3 pos )
{
return false;
}
@Override
public void getDrops( List<ItemStack> drops, boolean wrenched )
public void getDrops( final List<ItemStack> drops, final boolean wrenched )
{
}
@@ -256,21 +256,21 @@ public class PartCableAnchor implements IPart
@Override
public void randomDisplayTick(
World world,
BlockPos pos,
Random r )
final World world,
final BlockPos pos,
final Random r )
{
}
@Override
public void onPlacement( EntityPlayer player, ItemStack held, AEPartLocation side )
public void onPlacement( final EntityPlayer player, final ItemStack held, final AEPartLocation side )
{
}
@Override
public boolean canBePlacedOn( BusSupport what )
public boolean canBePlacedOn( final BusSupport what )
{
return what == BusSupport.CABLE || what == BusSupport.DENSE_CABLE;
}
@@ -80,39 +80,39 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
final DualityInterface duality = new DualityInterface( this.proxy, this );
@Reflected
public PartInterface( ItemStack is )
public PartInterface( final ItemStack is )
{
super( is );
}
@MENetworkEventSubscribe
public void stateChange( MENetworkChannelsChanged c )
public void stateChange( final MENetworkChannelsChanged c )
{
this.duality.notifyNeighbors();
}
@MENetworkEventSubscribe
public void stateChange( MENetworkPowerStatusChange c )
public void stateChange( final MENetworkPowerStatusChange c )
{
this.duality.notifyNeighbors();
}
@Override
public void getBoxes( IPartCollisionHelper bch )
public void getBoxes( final IPartCollisionHelper bch )
{
bch.addBox( 2, 2, 14, 14, 14, 16 );
bch.addBox( 5, 5, 12, 11, 11, 14 );
}
@Override
public int getInstalledUpgrades( Upgrades u )
public int getInstalledUpgrades( final Upgrades u )
{
return this.duality.getInstalledUpgrades( u );
}
@Override
@SideOnly( Side.CLIENT )
public void renderInventory( IPartRenderHelper rh, ModelGenerator renderer )
public void renderInventory( final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( is ), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
@@ -134,7 +134,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
@Override
@SideOnly( Side.CLIENT )
public void renderStatic( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer )
public void renderStatic( final BlockPos pos, final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(), renderer.getIcon( is ), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
@@ -155,14 +155,14 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public void readFromNBT( NBTTagCompound data )
public void readFromNBT( final NBTTagCompound data )
{
super.readFromNBT( data );
this.duality.readFromNBT( data );
}
@Override
public void writeToNBT( NBTTagCompound data )
public void writeToNBT( final NBTTagCompound data )
{
super.writeToNBT( data );
this.duality.writeToNBT( data );
@@ -176,7 +176,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public void getDrops( List<ItemStack> drops, boolean wrenched )
public void getDrops( final List<ItemStack> drops, final boolean wrenched )
{
this.duality.addDrops( drops );
}
@@ -194,13 +194,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public IInventory getInventoryByName( String name )
public IInventory getInventoryByName( final String name )
{
return this.duality.getInventoryByName( name );
}
@Override
public boolean onPartActivate( EntityPlayer p, Vec3 pos )
public boolean onPartActivate( final EntityPlayer p, final Vec3 pos )
{
if( p.isSneaking() )
{
@@ -216,13 +216,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public TextureAtlasSprite getBreakingTexture(ModelGenerator renderer)
public TextureAtlasSprite getBreakingTexture( final ModelGenerator renderer)
{
return renderer.getIcon( is ).getAtlas();
}
@Override
public boolean canInsert( ItemStack stack )
public boolean canInsert( final ItemStack stack )
{
return this.duality.canInsert( stack );
}
@@ -240,13 +240,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public TickingRequest getTickingRequest( IGridNode node )
public TickingRequest getTickingRequest( final IGridNode node )
{
return this.duality.getTickingRequest( node );
}
@Override
public TickRateModulation tickingRequest( IGridNode node, int ticksSinceLastCall )
public TickRateModulation tickingRequest( final IGridNode node, final int ticksSinceLastCall )
{
return this.duality.tickingRequest( node, ticksSinceLastCall );
}
@@ -258,25 +258,25 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public ItemStack getStackInSlot( int i )
public ItemStack getStackInSlot( final int i )
{
return this.duality.getStorage().getStackInSlot( i );
}
@Override
public ItemStack decrStackSize( int i, int j )
public ItemStack decrStackSize( final int i, final int j )
{
return this.duality.getStorage().decrStackSize( i, j );
}
@Override
public ItemStack getStackInSlotOnClosing( int i )
public ItemStack getStackInSlotOnClosing( final int i )
{
return this.duality.getStorage().getStackInSlotOnClosing( i );
}
@Override
public void setInventorySlotContents( int i, ItemStack itemstack )
public void setInventorySlotContents( final int i, final ItemStack itemstack )
{
this.duality.getStorage().setInventorySlotContents( i, itemstack );
}
@@ -306,49 +306,49 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public boolean isUseableByPlayer( EntityPlayer entityplayer )
public boolean isUseableByPlayer( final EntityPlayer entityplayer )
{
return this.duality.getStorage().isUseableByPlayer( entityplayer );
}
@Override
public void openInventory( EntityPlayer player )
public void openInventory( final EntityPlayer player )
{
this.duality.getStorage().openInventory(player);
}
@Override
public void closeInventory( EntityPlayer player )
public void closeInventory( final EntityPlayer player )
{
this.duality.getStorage().closeInventory(player);
}
@Override
public boolean isItemValidForSlot( int i, ItemStack itemstack )
public boolean isItemValidForSlot( final int i, final ItemStack itemstack )
{
return this.duality.getStorage().isItemValidForSlot( i, itemstack );
}
@Override
public int[] getSlotsForFace( EnumFacing side )
public int[] getSlotsForFace( final EnumFacing side )
{
return this.duality.getSlotsForFace( side );
}
@Override
public boolean canInsertItem( int i, ItemStack itemstack, EnumFacing j )
public boolean canInsertItem( final int i, final ItemStack itemstack, final EnumFacing j )
{
return true;
}
@Override
public boolean canExtractItem( int i, ItemStack itemstack, EnumFacing j )
public boolean canExtractItem( final int i, final ItemStack itemstack, final EnumFacing j )
{
return true;
}
@Override
public void onChangeInventory( IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack )
public void onChangeInventory( final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{
this.duality.onChangeInventory( inv, slot, mc, removedStack, newStack );
}
@@ -372,13 +372,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public IStorageMonitorable getMonitorable( EnumFacing side, BaseActionSource src )
public IStorageMonitorable getMonitorable( final EnumFacing side, final BaseActionSource src )
{
return this.duality.getMonitorable( side, src, this );
}
@Override
public boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table )
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table )
{
return this.duality.pushPattern( patternDetails, table );
}
@@ -390,7 +390,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public void provideCrafting( ICraftingProviderHelper craftingTracker )
public void provideCrafting( final ICraftingProviderHelper craftingTracker )
{
this.duality.provideCrafting( craftingTracker );
}
@@ -402,13 +402,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public IAEItemStack injectCraftedItems( ICraftingLink link, IAEItemStack items, Actionable mode )
public IAEItemStack injectCraftedItems( final ICraftingLink link, final IAEItemStack items, final Actionable mode )
{
return this.duality.injectCraftedItems( link, items, mode );
}
@Override
public void jobStateChange( ICraftingLink link )
public void jobStateChange( final ICraftingLink link )
{
this.duality.jobStateChange( link );
}
@@ -420,22 +420,22 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
}
@Override
public void setPriority( int newValue )
public void setPriority( final int newValue )
{
this.duality.setPriority( newValue );
}
@Override
public int getField(
int id )
final int id )
{
return 0;
}
@Override
public void setField(
int id,
int value )
final int id,
final int value )
{
}
@@ -26,7 +26,7 @@ import appeng.helpers.Reflected;
public class PartInvertedToggleBus extends PartToggleBus
{
@Reflected
public PartInvertedToggleBus( ItemStack is )
public PartInvertedToggleBus( final ItemStack is )
{
super( is );
this.proxy.setIdlePowerUsage( 0.0 );
@@ -100,7 +100,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
private byte resetCacheLogic = 0;
@Reflected
public PartStorageBus( ItemStack is )
public PartStorageBus( final ItemStack is )
{
super( is );
this.getConfigManager().registerSetting( Settings.ACCESS, AccessRestriction.READ_WRITE );
@@ -111,14 +111,14 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
@Override
@MENetworkEventSubscribe
public void powerRender( MENetworkPowerStatusChange c )
public void powerRender( final MENetworkPowerStatusChange c )
{
this.updateStatus();
}
private void updateStatus()
{
boolean currentActive = this.proxy.isActive();
final boolean currentActive = this.proxy.isActive();
if( this.wasActive != currentActive )
{
this.wasActive = currentActive;
@@ -127,7 +127,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
this.host.markForUpdate();
}
catch( GridAccessException e )
catch( final GridAccessException e )
{
// :P
}
@@ -135,7 +135,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@MENetworkEventSubscribe
public void updateChannels( MENetworkChannelsChanged changedChannels )
public void updateChannels( final MENetworkChannelsChanged changedChannels )
{
this.updateStatus();
}
@@ -147,14 +147,14 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
public void updateSetting( final IConfigManager manager, final Enum settingName, final Enum newValue )
{
this.resetCache( true );
this.host.markForSave();
}
@Override
public void onChangeInventory( IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack )
public void onChangeInventory( final IInventory inv, final int slot, final InvOperation mc, final ItemStack removedStack, final ItemStack newStack )
{
super.onChangeInventory( inv, slot, mc, removedStack, newStack );
@@ -172,7 +172,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void readFromNBT( NBTTagCompound data )
public void readFromNBT( final NBTTagCompound data )
{
super.readFromNBT( data );
this.Config.readFromNBT( data, "config" );
@@ -180,7 +180,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void writeToNBT( NBTTagCompound data )
public void writeToNBT( final NBTTagCompound data )
{
super.writeToNBT( data );
this.Config.writeToNBT( data, "config" );
@@ -188,7 +188,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public IInventory getInventoryByName( String name )
public IInventory getInventoryByName( final String name )
{
if( name.equals( "config" ) )
{
@@ -198,7 +198,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
return super.getInventoryByName( name );
}
private void resetCache( boolean fullReset )
private void resetCache( final boolean fullReset )
{
if( this.host == null || this.host.getTile() == null || this.host.getTile().getWorld() == null || this.host.getTile().getWorld().isRemote )
{
@@ -218,20 +218,20 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
this.proxy.getTick().alertDevice( this.proxy.getNode() );
}
catch( GridAccessException e )
catch( final GridAccessException e )
{
// :P
}
}
@Override
public boolean isValid( Object verificationToken )
public boolean isValid( final Object verificationToken )
{
return this.handler == verificationToken;
}
@Override
public void postChange( IBaseMonitor<IAEItemStack> monitor, Iterable<IAEItemStack> change, BaseActionSource source )
public void postChange( final IBaseMonitor<IAEItemStack> monitor, final Iterable<IAEItemStack> change, final BaseActionSource source )
{
try
{
@@ -240,7 +240,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.proxy.getStorage().postAlterationOfStoredItems( StorageChannel.ITEMS, change, this.mySrc );
}
}
catch( GridAccessException e )
catch( final GridAccessException e )
{
// :(
}
@@ -253,7 +253,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void getBoxes( IPartCollisionHelper bch )
public void getBoxes( final IPartCollisionHelper bch )
{
bch.addBox( 3, 3, 15, 13, 13, 16 );
bch.addBox( 2, 2, 14, 14, 14, 15 );
@@ -262,7 +262,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
@Override
@SideOnly( Side.CLIENT )
public void renderInventory( IPartRenderHelper rh, ModelGenerator renderer )
public void renderInventory( final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(), renderer.getIcon( is ), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
@@ -278,7 +278,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
@Override
@SideOnly( Side.CLIENT )
public void renderStatic( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer )
public void renderStatic( final BlockPos pos, final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(), renderer.getIcon( is ), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
@@ -314,7 +314,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public boolean onPartActivate( EntityPlayer player, Vec3 pos )
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
{
if( !player.isSneaking() )
{
@@ -331,13 +331,13 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public TickingRequest getTickingRequest( IGridNode node )
public TickingRequest getTickingRequest( final IGridNode node )
{
return new TickingRequest( TickRates.StorageBus.min, TickRates.StorageBus.max, this.monitor == null, true );
}
@Override
public TickRateModulation tickingRequest( IGridNode node, int ticksSinceLastCall )
public TickRateModulation tickingRequest( final IGridNode node, final int ticksSinceLastCall )
{
if( this.resetCacheLogic != 0 )
{
@@ -354,10 +354,10 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
private void resetCache()
{
boolean fullReset = this.resetCacheLogic == 2;
final boolean fullReset = this.resetCacheLogic == 2;
this.resetCacheLogic = 0;
IMEInventory<IAEItemStack> in = this.getInternalHandler();
final IMEInventory<IAEItemStack> in = this.getInternalHandler();
IItemList<IAEItemStack> before = AEApi.instance().storage().createItemList();
if( in != null )
{
@@ -370,7 +370,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.handlerHash = 0;
}
IMEInventory<IAEItemStack> out = this.getInternalHandler();
final IMEInventory<IAEItemStack> out = this.getInternalHandler();
if( this.monitor != null )
{
@@ -393,13 +393,13 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
return this.handler;
}
boolean wasSleeping = this.monitor == null;
final boolean wasSleeping = this.monitor == null;
this.cached = true;
TileEntity self = this.getHost().getTile();
TileEntity target = self.getWorld().getTileEntity( self.getPos().offset( side.getFacing() ) );
final TileEntity self = this.getHost().getTile();
final TileEntity target = self.getWorld().getTileEntity( self.getPos().offset( side.getFacing() ) );
int newHandlerHash = Platform.generateTileHash( target );
final int newHandlerHash = Platform.generateTileHash( target );
if( this.handlerHash == newHandlerHash && this.handlerHash != 0 )
{
@@ -411,7 +411,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
// force grid to update handlers...
this.proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
}
catch( GridAccessException e )
catch( final GridAccessException e )
{
// :3
}
@@ -421,14 +421,14 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.monitor = null;
if( target != null )
{
IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, this.side.getFacing().getOpposite(), StorageChannel.ITEMS, this.mySrc );
final IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, this.side.getFacing().getOpposite(), StorageChannel.ITEMS, this.mySrc );
if( esh != null )
{
IMEInventory inv = esh.getInventory( target, this.side.getFacing().getOpposite(), StorageChannel.ITEMS, this.mySrc );
final IMEInventory inv = esh.getInventory( target, this.side.getFacing().getOpposite(), StorageChannel.ITEMS, this.mySrc );
if( inv instanceof MEMonitorIInventory )
{
MEMonitorIInventory h = (MEMonitorIInventory) inv;
final MEMonitorIInventory h = (MEMonitorIInventory) inv;
h.mode = (StorageFilter) this.getConfigManager().getSetting( Settings.STORAGE_FILTER );
h.mySource = new MachineSource( this );
}
@@ -448,12 +448,12 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
this.handler.setWhitelist( this.getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST );
this.handler.setPriority( this.priority );
IItemList<IAEItemStack> priorityList = AEApi.instance().storage().createItemList();
final IItemList<IAEItemStack> priorityList = AEApi.instance().storage().createItemList();
int slotsToUse = 18 + this.getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
final int slotsToUse = 18 + this.getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
for( int x = 0; x < this.Config.getSizeInventory() && x < slotsToUse; x++ )
{
IAEItemStack is = this.Config.getAEStackInSlot( x );
final IAEItemStack is = this.Config.getAEStackInSlot( x );
if( is != null )
{
priorityList.add( is );
@@ -482,7 +482,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
try
{
ITickManager tm = this.proxy.getTick();
final ITickManager tm = this.proxy.getTick();
if( this.monitor == null )
{
tm.sleepDevice( this.proxy.getNode() );
@@ -492,7 +492,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
tm.wakeDevice( this.proxy.getNode() );
}
}
catch( GridAccessException e )
catch( final GridAccessException e )
{
// :(
}
@@ -501,7 +501,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
return this.handler;
}
private void checkInterfaceVsStorageBus( TileEntity target, AEPartLocation side )
private void checkInterfaceVsStorageBus( final TileEntity target, final AEPartLocation side )
{
IInterfaceHost achievement = null;
@@ -512,7 +512,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
if( target instanceof IPartHost )
{
Object part = ( (IPartHost) target ).getPart( side );
final Object part = ( (IPartHost) target ).getPart( side );
if( part instanceof IInterfaceHost )
{
achievement = (IInterfaceHost) part;
@@ -527,11 +527,11 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public List<IMEInventoryHandler> getCellArray( StorageChannel channel )
public List<IMEInventoryHandler> getCellArray( final StorageChannel channel )
{
if( channel == StorageChannel.ITEMS )
{
IMEInventoryHandler out = this.proxy.isActive() ? this.getInternalHandler() : null;
final IMEInventoryHandler out = this.proxy.isActive() ? this.getInternalHandler() : null;
if( out != null )
{
return Collections.singletonList( out );
@@ -547,7 +547,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void setPriority( int newValue )
public void setPriority( final int newValue )
{
this.priority = newValue;
this.host.markForSave();
@@ -555,7 +555,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
@Override
public void blinkCell( int slot )
public void blinkCell( final int slot )
{
}
@@ -569,7 +569,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
*/
@Override
public void saveChanges( IMEInventory cellInventory )
public void saveChanges( final IMEInventory cellInventory )
{
// nope!
}
@@ -59,7 +59,7 @@ public class PartToggleBus extends PartBasicState
boolean hasRedstone = false;
@Reflected
public PartToggleBus( ItemStack is )
public PartToggleBus( final ItemStack is )
{
super( is );
@@ -70,14 +70,14 @@ public class PartToggleBus extends PartBasicState
}
@Override
public void setColors( ModelGenerator renderer, boolean hasChan, boolean hasPower )
public void setColors( final ModelGenerator renderer, final boolean hasChan, final boolean hasPower )
{
this.hasRedstone = ( this.clientFlags & REDSTONE_FLAG ) == REDSTONE_FLAG;
super.setColors( renderer, hasChan && this.hasRedstone, hasPower && this.hasRedstone );
}
@Override
protected int populateFlags( int cf )
protected int populateFlags( final int cf )
{
return cf | ( this.getIntention() ? REDSTONE_FLAG : 0 );
}
@@ -88,13 +88,13 @@ public class PartToggleBus extends PartBasicState
}
@Override
public TextureAtlasSprite getBreakingTexture( ModelGenerator renderer )
public TextureAtlasSprite getBreakingTexture( final ModelGenerator renderer )
{
return renderer.getIcon( is ).getAtlas();
}
@Override
public AECableType getCableConnectionType( AEPartLocation dir )
public AECableType getCableConnectionType( final AEPartLocation dir )
{
return AECableType.GLASS;
}
@@ -104,7 +104,7 @@ public class PartToggleBus extends PartBasicState
{
if( this.is.stackSize > 0 )
{
List<ItemStack> items = new ArrayList<ItemStack>();
final List<ItemStack> items = new ArrayList<ItemStack>();
items.add( this.is.copy() );
this.host.removePart( this.side, false );
Platform.spawnDrops( this.tile.getWorld(), this.tile.getPos(), items );
@@ -113,14 +113,14 @@ public class PartToggleBus extends PartBasicState
}
@Override
public void getBoxes( IPartCollisionHelper bch )
public void getBoxes( final IPartCollisionHelper bch )
{
bch.addBox( 6, 6, 11, 10, 10, 16 );
}
@Override
@SideOnly( Side.CLIENT )
public void renderInventory( IPartRenderHelper rh, ModelGenerator renderer )
public void renderInventory( final IPartRenderHelper rh, final ModelGenerator renderer )
{
GL11.glTranslated( -0.2, -0.3, 0.0 );
@@ -145,7 +145,7 @@ public class PartToggleBus extends PartBasicState
@Override
@SideOnly( Side.CLIENT )
public void renderStatic( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer )
public void renderStatic( final BlockPos pos, final IPartRenderHelper rh, final ModelGenerator renderer )
{
rh.setTexture( renderer.getIcon( is ) );
@@ -166,7 +166,7 @@ public class PartToggleBus extends PartBasicState
@Override
public void onNeighborChanged()
{
boolean oldHasRedstone = this.hasRedstone;
final boolean oldHasRedstone = this.hasRedstone;
this.hasRedstone = this.getHost().hasRedstone( this.side );
if( this.hasRedstone != oldHasRedstone )
@@ -177,14 +177,14 @@ public class PartToggleBus extends PartBasicState
}
@Override
public void readFromNBT( NBTTagCompound extra )
public void readFromNBT( final NBTTagCompound extra )
{
super.readFromNBT( extra );
this.outerProxy.readFromNBT( extra );
}
@Override
public void writeToNBT( NBTTagCompound extra )
public void writeToNBT( final NBTTagCompound extra )
{
super.writeToNBT( extra );
this.outerProxy.writeToNBT( extra );
@@ -207,7 +207,7 @@ public class PartToggleBus extends PartBasicState
}
@Override
public void setPartHostInfo( AEPartLocation side, IPartHost host, TileEntity tile )
public void setPartHostInfo( final AEPartLocation side, final IPartHost host, final TileEntity tile )
{
super.setPartHostInfo( side, host, tile );
this.outerProxy.setValidSides( EnumSet.of( side.getFacing() ) );
@@ -226,7 +226,7 @@ public class PartToggleBus extends PartBasicState
}
@Override
public void onPlacement( EntityPlayer player, ItemStack held, AEPartLocation side )
public void onPlacement( final EntityPlayer player, final ItemStack held, final AEPartLocation side )
{
super.onPlacement( player, held, side );
this.outerProxy.setOwner( player );
@@ -234,7 +234,7 @@ public class PartToggleBus extends PartBasicState
private void updateInternalState()
{
boolean intention = this.getIntention();
final boolean intention = this.getIntention();
if( intention == ( this.connection == null ) )
{
if( this.proxy.getNode() != null && this.outerProxy.getNode() != null )
@@ -245,7 +245,7 @@ public class PartToggleBus extends PartBasicState
{
this.connection = AEApi.instance().createGridConnection( this.proxy.getNode(), this.outerProxy.getNode() );
}
catch( FailedConnection e )
catch( final FailedConnection e )
{
// :(
}