final variables and parameters
This commit is contained in:
@@ -49,12 +49,12 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
AEColor paintedColor = AEColor.Transparent;
|
||||
|
||||
@TileEvent( TileEventType.NETWORK_READ )
|
||||
public boolean readFromStream_TileCraftingMonitorTile( ByteBuf data ) throws IOException
|
||||
public boolean readFromStream_TileCraftingMonitorTile( final ByteBuf data ) throws IOException
|
||||
{
|
||||
AEColor oldPaintedColor = this.paintedColor;
|
||||
final AEColor oldPaintedColor = this.paintedColor;
|
||||
this.paintedColor = AEColor.values()[data.readByte()];
|
||||
|
||||
boolean hasItem = data.readBoolean();
|
||||
final boolean hasItem = data.readBoolean();
|
||||
|
||||
if( hasItem )
|
||||
{
|
||||
@@ -70,7 +70,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.NETWORK_WRITE )
|
||||
public void writeToStream_TileCraftingMonitorTile( ByteBuf data ) throws IOException
|
||||
public void writeToStream_TileCraftingMonitorTile( final ByteBuf data ) throws IOException
|
||||
{
|
||||
data.writeByte( this.paintedColor.ordinal() );
|
||||
|
||||
@@ -86,7 +86,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_TileCraftingMonitorTile( NBTTagCompound data )
|
||||
public void readFromNBT_TileCraftingMonitorTile( final NBTTagCompound data )
|
||||
{
|
||||
if( data.hasKey( "paintedColor" ) )
|
||||
{
|
||||
@@ -95,7 +95,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_TileCraftingMonitorTile( NBTTagCompound data )
|
||||
public void writeToNBT_TileCraftingMonitorTile( final NBTTagCompound data )
|
||||
{
|
||||
data.setByte( "paintedColor", (byte) this.paintedColor.ordinal() );
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setJob( IAEItemStack is )
|
||||
public void setJob( final IAEItemStack is )
|
||||
{
|
||||
if( ( is == null ) != ( this.dspPlay == null ) )
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock( EnumFacing side, AEColor newPaintedColor, EntityPlayer who )
|
||||
public boolean recolourBlock( final EnumFacing side, final AEColor newPaintedColor, final EntityPlayer who )
|
||||
{
|
||||
if( this.paintedColor == newPaintedColor )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TileCraftingStorageTile extends TileCraftingTile
|
||||
public static final int KILO_SCALAR = 1024;
|
||||
|
||||
@Override
|
||||
protected ItemStack getItemFromTile( Object obj )
|
||||
protected ItemStack getItemFromTile( final Object obj )
|
||||
{
|
||||
final IBlocks blocks = AEApi.instance().definitions().blocks();
|
||||
final int storage = ( (TileCraftingTile) obj ).getStorageBytes() / KILO_SCALAR;
|
||||
@@ -38,19 +38,19 @@ public class TileCraftingStorageTile extends TileCraftingTile
|
||||
switch( storage )
|
||||
{
|
||||
case 4:
|
||||
for( ItemStack stack : blocks.craftingStorage4k().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : blocks.craftingStorage4k().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
for( ItemStack stack : blocks.craftingStorage16k().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : blocks.craftingStorage16k().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
break;
|
||||
case 64:
|
||||
for( ItemStack stack : blocks.craftingStorage64k().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : blocks.craftingStorage64k().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class TileCraftingStorageTile extends TileCraftingTile
|
||||
return 0;
|
||||
}
|
||||
|
||||
BlockCraftingUnit unit = (BlockCraftingUnit)this.worldObj.getBlockState( pos ).getBlock();
|
||||
final BlockCraftingUnit unit = (BlockCraftingUnit)this.worldObj.getBlockState( pos ).getBlock();
|
||||
switch( unit.type )
|
||||
{
|
||||
default:
|
||||
|
||||
@@ -77,11 +77,11 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getItemFromTile( Object obj )
|
||||
protected ItemStack getItemFromTile( final Object obj )
|
||||
{
|
||||
if( ( (TileCraftingTile) obj ).isAccelerator() )
|
||||
{
|
||||
for( ItemStack accelerator : AEApi.instance().definitions().blocks().craftingAccelerator().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack accelerator : AEApi.instance().definitions().blocks().craftingAccelerator().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return accelerator;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName( String name )
|
||||
public void setName( final String name )
|
||||
{
|
||||
super.setName( name );
|
||||
if( this.cluster != null )
|
||||
@@ -114,7 +114,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
return false;
|
||||
}
|
||||
|
||||
BlockCraftingUnit unit = (BlockCraftingUnit)this.worldObj.getBlockState( pos ).getBlock();
|
||||
final BlockCraftingUnit unit = (BlockCraftingUnit)this.worldObj.getBlockState( pos ).getBlock();
|
||||
return unit.type == CraftingUnitType.ACCELERATOR;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
this.calc.calculateMultiblock( this.worldObj, this.getLocation() );
|
||||
}
|
||||
|
||||
public void updateStatus( CraftingCPUCluster c )
|
||||
public void updateStatus( final CraftingCPUCluster c )
|
||||
{
|
||||
if( this.cluster != null && this.cluster != c )
|
||||
{
|
||||
@@ -142,14 +142,14 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
this.updateMeta( true );
|
||||
}
|
||||
|
||||
public void updateMeta( boolean updateFormed )
|
||||
public void updateMeta( final boolean updateFormed )
|
||||
{
|
||||
if( this.worldObj == null || this.notLoaded() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean formed = this.isFormed();
|
||||
final boolean formed = this.isFormed();
|
||||
boolean power = false;
|
||||
|
||||
if( this.gridProxy.isReady() )
|
||||
@@ -157,8 +157,8 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
power = this.gridProxy.isActive();
|
||||
}
|
||||
|
||||
IBlockState current = this.worldObj.getBlockState( pos );
|
||||
IBlockState newState = current.withProperty( BlockCraftingUnit.POWERED, power ).withProperty( BlockCraftingUnit.FORMED, formed );
|
||||
final IBlockState current = this.worldObj.getBlockState( pos );
|
||||
final IBlockState newState = current.withProperty( BlockCraftingUnit.POWERED, power ).withProperty( BlockCraftingUnit.FORMED, formed );
|
||||
|
||||
if( current != newState )
|
||||
{
|
||||
@@ -188,7 +188,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_TileCraftingTile( NBTTagCompound data )
|
||||
public void writeToNBT_TileCraftingTile( final NBTTagCompound data )
|
||||
{
|
||||
data.setBoolean( "core", this.isCoreBlock );
|
||||
if( this.isCoreBlock && this.cluster != null )
|
||||
@@ -198,7 +198,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_TileCraftingTile( NBTTagCompound data )
|
||||
public void readFromNBT_TileCraftingTile( final NBTTagCompound data )
|
||||
{
|
||||
this.isCoreBlock = data.getBoolean( "core" );
|
||||
if( this.isCoreBlock )
|
||||
@@ -215,7 +215,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect( boolean update )
|
||||
public void disconnect( final boolean update )
|
||||
{
|
||||
if( this.cluster != null )
|
||||
{
|
||||
@@ -240,13 +240,13 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void onPowerStateChange( MENetworkChannelsChanged ev )
|
||||
public void onPowerStateChange( final MENetworkChannelsChanged ev )
|
||||
{
|
||||
this.updateMeta( false );
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void onPowerStateChange( MENetworkPowerStatusChange ev )
|
||||
public void onPowerStateChange( final MENetworkPowerStatusChange ev )
|
||||
{
|
||||
this.updateMeta( false );
|
||||
}
|
||||
@@ -271,25 +271,25 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
if( this.cluster != null )
|
||||
{
|
||||
this.cluster.cancel();
|
||||
IMEInventory<IAEItemStack> inv = this.cluster.getInventory();
|
||||
final IMEInventory<IAEItemStack> inv = this.cluster.getInventory();
|
||||
|
||||
LinkedList<WorldCoord> places = new LinkedList<WorldCoord>();
|
||||
final LinkedList<WorldCoord> places = new LinkedList<WorldCoord>();
|
||||
|
||||
Iterator<IGridHost> i = this.cluster.getTiles();
|
||||
final Iterator<IGridHost> i = this.cluster.getTiles();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
IGridHost h = i.next();
|
||||
final IGridHost h = i.next();
|
||||
if( h == this )
|
||||
{
|
||||
places.add( new WorldCoord( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
TileEntity te = (TileEntity) h;
|
||||
final TileEntity te = (TileEntity) h;
|
||||
|
||||
for( AEPartLocation d : AEPartLocation.SIDE_LOCATIONS )
|
||||
for( final AEPartLocation d : AEPartLocation.SIDE_LOCATIONS )
|
||||
{
|
||||
WorldCoord wc = new WorldCoord( te );
|
||||
final WorldCoord wc = new WorldCoord( te );
|
||||
wc.add( d, 1 );
|
||||
if( this.worldObj.isAirBlock( wc.getPos() ) )
|
||||
{
|
||||
@@ -312,13 +312,13 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
ais.setStackSize( ais.getItemStack().getMaxStackSize() );
|
||||
while( true )
|
||||
{
|
||||
IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, this.cluster.getActionSource() );
|
||||
final IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, this.cluster.getActionSource() );
|
||||
if( g == null )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
WorldCoord wc = places.poll();
|
||||
final WorldCoord wc = places.poll();
|
||||
places.add( wc );
|
||||
|
||||
Platform.spawnDrops( this.worldObj, wc.getPos(), Collections.singletonList( g.getItemStack() ) );
|
||||
|
||||
@@ -111,7 +111,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pushPattern( ICraftingPatternDetails patternDetails, InventoryCrafting table, EnumFacing where )
|
||||
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table, final EnumFacing where )
|
||||
{
|
||||
if( this.myPattern == null )
|
||||
{
|
||||
@@ -142,7 +142,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
|
||||
private void updateSleepiness()
|
||||
{
|
||||
boolean wasEnabled = this.isAwake;
|
||||
final boolean wasEnabled = this.isAwake;
|
||||
this.isAwake = this.myPlan != null && this.hasMats() || this.canPush();
|
||||
if( wasEnabled != this.isAwake )
|
||||
{
|
||||
@@ -157,7 +157,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
this.gridProxy.getTick().sleepDevice( this.gridProxy.getNode() );
|
||||
}
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
catch( final GridAccessException e )
|
||||
{
|
||||
// :P
|
||||
}
|
||||
@@ -191,34 +191,34 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInstalledUpgrades( Upgrades u )
|
||||
public int getInstalledUpgrades( final Upgrades u )
|
||||
{
|
||||
return this.upgrades.getInstalledUpgrades( u );
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.NETWORK_READ )
|
||||
public boolean readFromStream_TileMolecularAssembler( ByteBuf data )
|
||||
public boolean readFromStream_TileMolecularAssembler( final ByteBuf data )
|
||||
{
|
||||
boolean oldPower = this.isPowered;
|
||||
final boolean oldPower = this.isPowered;
|
||||
this.isPowered = data.readBoolean();
|
||||
return this.isPowered != oldPower;
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.NETWORK_WRITE )
|
||||
public void writeToStream_TileMolecularAssembler( ByteBuf data )
|
||||
public void writeToStream_TileMolecularAssembler( final ByteBuf data )
|
||||
{
|
||||
data.writeBoolean( this.isPowered );
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_TileMolecularAssembler( NBTTagCompound data )
|
||||
public void writeToNBT_TileMolecularAssembler( final NBTTagCompound data )
|
||||
{
|
||||
if( this.forcePlan && this.myPlan != null )
|
||||
{
|
||||
ItemStack pattern = this.myPlan.getPattern();
|
||||
final ItemStack pattern = this.myPlan.getPattern();
|
||||
if( pattern != null )
|
||||
{
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
final NBTTagCompound compound = new NBTTagCompound();
|
||||
pattern.writeToNBT( compound );
|
||||
data.setTag( "myPlan", compound );
|
||||
data.setInteger( "pushDirection", this.pushDirection.ordinal() );
|
||||
@@ -231,17 +231,17 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_TileMolecularAssembler( NBTTagCompound data )
|
||||
public void readFromNBT_TileMolecularAssembler( final NBTTagCompound data )
|
||||
{
|
||||
if( data.hasKey( "myPlan" ) )
|
||||
{
|
||||
ItemStack myPat = ItemStack.loadItemStackFromNBT( data.getCompoundTag( "myPlan" ) );
|
||||
final ItemStack myPat = ItemStack.loadItemStackFromNBT( data.getCompoundTag( "myPlan" ) );
|
||||
|
||||
if( myPat != null && myPat.getItem() instanceof ItemEncodedPattern )
|
||||
{
|
||||
World w = this.getWorld();
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) myPat.getItem();
|
||||
ICraftingPatternDetails ph = iep.getPatternForItem( myPat, w );
|
||||
final World w = this.getWorld();
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) myPat.getItem();
|
||||
final ICraftingPatternDetails ph = iep.getPatternForItem( myPat, w );
|
||||
if( ph != null && ph.isCraftable() )
|
||||
{
|
||||
this.forcePlan = true;
|
||||
@@ -266,15 +266,15 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack is = this.inv.getStackInSlot( 10 );
|
||||
final ItemStack is = this.inv.getStackInSlot( 10 );
|
||||
|
||||
if( is != null && is.getItem() instanceof ItemEncodedPattern )
|
||||
{
|
||||
if( !Platform.isSameItem( is, this.myPattern ) )
|
||||
{
|
||||
World w = this.getWorld();
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
ICraftingPatternDetails ph = iep.getPatternForItem( is, w );
|
||||
final World w = this.getWorld();
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
final ICraftingPatternDetails ph = iep.getPatternForItem( is, w );
|
||||
|
||||
if( ph != null && ph.isCraftable() )
|
||||
{
|
||||
@@ -297,7 +297,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType( AEPartLocation dir )
|
||||
public AECableType getCableConnectionType( final AEPartLocation dir )
|
||||
{
|
||||
return AECableType.COVERED;
|
||||
}
|
||||
@@ -315,7 +315,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getInventoryByName( String name )
|
||||
public IInventory getInventoryByName( final String name )
|
||||
{
|
||||
if( name.equals( "upgrades" ) )
|
||||
{
|
||||
@@ -331,7 +331,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
||||
public void updateSetting( final IConfigManager manager, final Enum settingName, final Enum newValue )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -349,7 +349,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot( int i, ItemStack itemstack )
|
||||
public boolean isItemValidForSlot( final int i, final ItemStack itemstack )
|
||||
{
|
||||
if( i >= 9 )
|
||||
{
|
||||
@@ -370,7 +370,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeInventory( IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added )
|
||||
public void onChangeInventory( final IInventory inv, final int slot, final InvOperation mc, final ItemStack removed, final ItemStack added )
|
||||
{
|
||||
if( inv == this.inv )
|
||||
{
|
||||
@@ -379,13 +379,13 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem( int slotIndex, ItemStack extractedItem, EnumFacing side )
|
||||
public boolean canExtractItem( final int slotIndex, final ItemStack extractedItem, final EnumFacing side )
|
||||
{
|
||||
return slotIndex == 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsBySide( EnumFacing whichSide )
|
||||
public int[] getAccessibleSlotsBySide( final EnumFacing whichSide )
|
||||
{
|
||||
return SIDES;
|
||||
}
|
||||
@@ -397,15 +397,15 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
|
||||
@Override
|
||||
public void getDrops(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
List<ItemStack> drops )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final List<ItemStack> drops )
|
||||
{
|
||||
super.getDrops( w, pos, drops );
|
||||
|
||||
for( int h = 0; h < this.upgrades.getSizeInventory(); h++ )
|
||||
{
|
||||
ItemStack is = this.upgrades.getStackInSlot( h );
|
||||
final ItemStack is = this.upgrades.getStackInSlot( h );
|
||||
if( is != null )
|
||||
{
|
||||
drops.add( is );
|
||||
@@ -414,7 +414,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickingRequest getTickingRequest( IGridNode node )
|
||||
public TickingRequest getTickingRequest( final IGridNode node )
|
||||
{
|
||||
this.recalculatePlan();
|
||||
this.updateSleepiness();
|
||||
@@ -422,7 +422,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest( IGridNode node, int ticksSinceLastCall )
|
||||
public TickRateModulation tickingRequest( final IGridNode node, int ticksSinceLastCall )
|
||||
{
|
||||
if( this.inv.getStackInSlot( 9 ) != null )
|
||||
{
|
||||
@@ -488,7 +488,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
this.progress = 0;
|
||||
ItemStack output = this.myPlan.getOutput( this.craftingInv, this.getWorld() );
|
||||
final ItemStack output = this.myPlan.getOutput( this.craftingInv, this.getWorld() );
|
||||
if( output != null )
|
||||
{
|
||||
FMLCommonHandler.instance().firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) this.getWorld() ), output, this.craftingInv );
|
||||
@@ -511,11 +511,11 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
|
||||
try
|
||||
{
|
||||
TargetPoint where = new TargetPoint( this.worldObj.provider.getDimensionId(), pos.getX(), pos.getY(), pos.getZ(), 32 );
|
||||
IAEItemStack item = AEItemStack.create( output );
|
||||
final TargetPoint where = new TargetPoint( this.worldObj.provider.getDimensionId(), pos.getX(), pos.getY(), pos.getZ(), 32 );
|
||||
final IAEItemStack item = AEItemStack.create( output );
|
||||
NetworkHandler.instance.sendToAllAround( new PacketAssemblerAnimation( pos, (byte) speed, item ), where );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
// ;P
|
||||
}
|
||||
@@ -535,7 +535,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
{
|
||||
for( int x = 0; x < 9; x++ )
|
||||
{
|
||||
ItemStack is = this.inv.getStackInSlot( x );
|
||||
final ItemStack is = this.inv.getStackInSlot( x );
|
||||
if( is != null )
|
||||
{
|
||||
if( this.myPlan == null || !this.myPlan.isValidItemForSlot( x, is, this.worldObj ) )
|
||||
@@ -550,13 +550,13 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
}
|
||||
|
||||
private int userPower( int ticksPassed, int bonusValue, double acceleratorTax )
|
||||
private int userPower( final int ticksPassed, final int bonusValue, final double acceleratorTax )
|
||||
{
|
||||
try
|
||||
{
|
||||
return (int) ( this.gridProxy.getEnergy().extractAEPower( ticksPassed * bonusValue * acceleratorTax, Actionable.MODULATE, PowerMultiplier.CONFIG ) / acceleratorTax );
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
catch( final GridAccessException e )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -566,7 +566,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
{
|
||||
if( this.pushDirection == AEPartLocation.INTERNAL )
|
||||
{
|
||||
for( EnumFacing d : EnumFacing.VALUES )
|
||||
for( final EnumFacing d : EnumFacing.VALUES )
|
||||
{
|
||||
output = this.pushTo( output, d );
|
||||
}
|
||||
@@ -585,30 +585,30 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
this.inv.setInventorySlotContents( 9, output );
|
||||
}
|
||||
|
||||
private ItemStack pushTo( ItemStack output, EnumFacing d )
|
||||
private ItemStack pushTo( ItemStack output, final EnumFacing d )
|
||||
{
|
||||
if( output == null )
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
TileEntity te = this.getWorld().getTileEntity( pos.offset( d ) );
|
||||
final TileEntity te = this.getWorld().getTileEntity( pos.offset( d ) );
|
||||
|
||||
if( te == null )
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( te, d.getOpposite() );
|
||||
final InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( te, d.getOpposite() );
|
||||
|
||||
if( adaptor == null )
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
int size = output.stackSize;
|
||||
final int size = output.stackSize;
|
||||
output = adaptor.addItems( output );
|
||||
int newSize = output == null ? 0 : output.stackSize;
|
||||
final int newSize = output == null ? 0 : output.stackSize;
|
||||
|
||||
if( size != newSize )
|
||||
{
|
||||
@@ -619,7 +619,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void onPowerEvent( MENetworkPowerStatusChange p )
|
||||
public void onPowerEvent( final MENetworkPowerStatusChange p )
|
||||
{
|
||||
this.updatePowerState();
|
||||
}
|
||||
@@ -632,7 +632,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
{
|
||||
newState = this.gridProxy.isActive() && this.gridProxy.getEnergy().extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.0001;
|
||||
}
|
||||
catch( GridAccessException ignored )
|
||||
catch( final GridAccessException ignored )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user