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
@@ -62,7 +62,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, IUpdatePl
if( this.charge >= this.ticksPerRotation )
{
this.charge -= this.ticksPerRotation;
ICrankable g = this.getGrinder();
final ICrankable g = this.getGrinder();
if( g != null )
{
g.applyTurn();
@@ -80,8 +80,8 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, IUpdatePl
return null;
}
EnumFacing grinder = this.getUp().getOpposite();
TileEntity te = this.worldObj.getTileEntity( pos.offset( grinder ) );
final EnumFacing grinder = this.getUp().getOpposite();
final TileEntity te = this.worldObj.getTileEntity( pos.offset( grinder ) );
if( te instanceof ICrankable )
{
return (ICrankable) te;
@@ -90,23 +90,23 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, IUpdatePl
}
@TileEvent( TileEventType.NETWORK_READ )
public boolean readFromStream_TileCrank( ByteBuf data )
public boolean readFromStream_TileCrank( final ByteBuf data )
{
this.rotation = data.readInt();
return false;
}
@TileEvent( TileEventType.NETWORK_WRITE )
public void writeToStream_TileCrank( ByteBuf data )
public void writeToStream_TileCrank( final ByteBuf data )
{
data.writeInt( this.rotation );
}
@Override
public void setOrientation( EnumFacing inForward, EnumFacing inUp )
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
{
super.setOrientation( inForward, inUp );
IBlockState state = this.worldObj.getBlockState( pos );
final IBlockState state = this.worldObj.getBlockState( pos );
this.getBlockType().onNeighborBlockChange( this.worldObj, pos, state, state.getBlock() );
}
@@ -128,7 +128,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, IUpdatePl
if( this.rotation < 3 )
{
ICrankable g = this.getGrinder();
final ICrankable g = this.getGrinder();
if( g != null )
{
if( g.canTurn() )
@@ -154,28 +154,28 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, IUpdatePl
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w,
BlockPos pos,
Entity thePlayer,
boolean b )
final World w,
final BlockPos pos,
final Entity thePlayer,
final boolean b )
{
double xOff = -0.15 * this.getUp().getFrontOffsetX();
double yOff = -0.15 * this.getUp().getFrontOffsetY();
double zOff = -0.15 * this.getUp().getFrontOffsetZ();
final double xOff = -0.15 * this.getUp().getFrontOffsetX();
final double yOff = -0.15 * this.getUp().getFrontOffsetY();
final double zOff = -0.15 * this.getUp().getFrontOffsetZ();
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.15, yOff + 0.15, zOff + 0.15, xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
}
@Override
public void addCollidingBlockToList(
World w,
BlockPos pos,
AxisAlignedBB bb,
List<AxisAlignedBB> out,
Entity e )
final World w,
final BlockPos pos,
final AxisAlignedBB bb,
final List<AxisAlignedBB> out,
final Entity e )
{
double xOff = -0.15 * this.getUp().getFrontOffsetX();
double yOff = -0.15 * this.getUp().getFrontOffsetY();
double zOff = -0.15 * this.getUp().getFrontOffsetZ();
final double xOff = -0.15 * this.getUp().getFrontOffsetX();
final double yOff = -0.15 * this.getUp().getFrontOffsetY();
final double zOff = -0.15 * this.getUp().getFrontOffsetZ();
out.add( AxisAlignedBB.fromBounds( xOff + 0.15, yOff + 0.15, zOff + 0.15,// ahh
xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
}
@@ -46,10 +46,10 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
int points;
@Override
public void setOrientation( EnumFacing inForward, EnumFacing inUp )
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
{
super.setOrientation( inForward, inUp );
IBlockState state = worldObj.getBlockState( pos );
final IBlockState state = worldObj.getBlockState( pos );
this.getBlockType().onNeighborBlockChange( this.worldObj, pos, state, state.getBlock() );
}
@@ -60,13 +60,13 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
}
@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 )
{
}
@Override
public boolean canInsertItem( int slotIndex, ItemStack insertingItem, EnumFacing side )
public boolean canInsertItem( final int slotIndex, final ItemStack insertingItem, final EnumFacing side )
{
if( AEApi.instance().registries().grinder().getRecipeForInput( insertingItem ) == null )
{
@@ -77,13 +77,13 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
}
@Override
public boolean canExtractItem( int slotIndex, ItemStack extractedItem, EnumFacing side )
public boolean canExtractItem( final int slotIndex, final ItemStack extractedItem, final EnumFacing side )
{
return slotIndex >= 3 && slotIndex <= 5;
}
@Override
public int[] getAccessibleSlotsBySide( EnumFacing side )
public int[] getAccessibleSlotsBySide( final EnumFacing side )
{
return this.sides;
}
@@ -98,7 +98,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
if( null == this.getStackInSlot( 6 ) ) // Add if there isn't one...
{
IInventory src = new WrapperInventoryRange( this, this.inputs, true );
final IInventory src = new WrapperInventoryRange( this, this.inputs, true );
for( int x = 0; x < src.getSizeInventory(); x++ )
{
ItemStack item = src.getStackInSlot( x );
@@ -107,13 +107,13 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
continue;
}
IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( item );
final IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( item );
if( r != null )
{
if( item.stackSize >= r.getInput().stackSize )
{
item.stackSize -= r.getInput().stackSize;
ItemStack ais = item.copy();
final ItemStack ais = item.copy();
ais.stackSize = r.getInput().stackSize;
if( item.stackSize <= 0 )
@@ -142,8 +142,8 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
this.points++;
ItemStack processing = this.getStackInSlot( 6 );
IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( processing );
final ItemStack processing = this.getStackInSlot( 6 );
final IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( processing );
if( r != null )
{
if( r.getEnergyCost() > this.points )
@@ -152,7 +152,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
}
this.points = 0;
InventoryAdaptor sia = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( this, 3, 3, true ), EnumFacing.EAST );
final InventoryAdaptor sia = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( this, 3, 3, true ), EnumFacing.EAST );
this.addItem( sia, r.getOutput() );
@@ -172,17 +172,17 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
}
}
private void addItem( InventoryAdaptor sia, ItemStack output )
private void addItem( final InventoryAdaptor sia, final ItemStack output )
{
if( output == null )
{
return;
}
ItemStack notAdded = sia.addItems( output );
final ItemStack notAdded = sia.addItems( output );
if( notAdded != null )
{
List<ItemStack> out = new ArrayList<ItemStack>();
final List<ItemStack> out = new ArrayList<ItemStack>();
out.add( notAdded );
Platform.spawnDrops( this.worldObj, pos.offset( this.getForward() ), out );
@@ -190,7 +190,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
}
@Override
public boolean canCrankAttach( EnumFacing directionToCrank )
public boolean canCrankAttach( final EnumFacing directionToCrank )
{
return this.getUp() == directionToCrank;
}