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
@@ -66,14 +66,14 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override
public int getMetaFromState(
IBlockState state )
final IBlockState state )
{
return 0;
}
@Override
public IBlockState getStateFromMeta(
int meta )
final int meta )
{
return getDefaultState();
}
@@ -91,29 +91,29 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
}
@Override
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up )
public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
{
return this.canPlaceAt( w, pos, up.getOpposite() );
}
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir )
private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
{
BlockPos test = pos.offset( dir );
final BlockPos test = pos.offset( dir );
return w.isSideSolid( test, dir.getOpposite(), false );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity e, boolean isVisual )
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity e, final boolean isVisual )
{
EnumFacing up = this.getOrientable( w, pos ).getUp();
double xOff = -0.3 * up.getFrontOffsetX();
double yOff = -0.3 * up.getFrontOffsetY();
double zOff = -0.3 * up.getFrontOffsetZ();
final EnumFacing up = this.getOrientable( w, pos ).getUp();
final double xOff = -0.3 * up.getFrontOffsetX();
final double yOff = -0.3 * up.getFrontOffsetY();
final double zOff = -0.3 * up.getFrontOffsetZ();
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
}
@Override
public void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List out, Entity e )
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List out, final Entity e )
{/*
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
@@ -124,10 +124,10 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override
@SideOnly( Side.CLIENT )
public void randomDisplayTick(
World w,
BlockPos pos,
IBlockState state,
Random r )
final World w,
final BlockPos pos,
final IBlockState state,
final Random r )
{
if( !AEConfig.instance.enableEffects )
{
@@ -139,15 +139,15 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
return;
}
EnumFacing up = this.getOrientable( w, pos ).getUp();
double xOff = -0.3 * up.getFrontOffsetX();
double yOff = -0.3 * up.getFrontOffsetY();
double zOff = -0.3 * up.getFrontOffsetZ();
final EnumFacing up = this.getOrientable( w, pos ).getUp();
final double xOff = -0.3 * up.getFrontOffsetX();
final double yOff = -0.3 * up.getFrontOffsetY();
final double zOff = -0.3 * up.getFrontOffsetZ();
for( int bolts = 0; bolts < 3; bolts++ )
{
if( CommonHelper.proxy.shouldAddParticles( r ) )
{
LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
}
@@ -156,28 +156,28 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override
public void onNeighborBlockChange(
World w,
BlockPos pos,
IBlockState state,
Block neighborBlock )
final World w,
final BlockPos pos,
final IBlockState state,
final Block neighborBlock )
{
EnumFacing up = this.getOrientable( w, pos ).getUp();
final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
{
this.dropTorch( w, pos );
}
}
private void dropTorch( World w, BlockPos pos )
private void dropTorch( final World w, final BlockPos pos )
{
w.destroyBlock( pos, true );
w.markBlockForUpdate( pos );
}
@Override
public boolean canPlaceBlockAt( World w, BlockPos pos )
public boolean canPlaceBlockAt( final World w, final BlockPos pos )
{
for( EnumFacing dir : EnumFacing.VALUES )
for( final EnumFacing dir : EnumFacing.VALUES )
{
if( this.canPlaceAt( w, pos, dir ) )
{
@@ -194,7 +194,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
}
@Override
public IOrientable getOrientable( final IBlockAccess w, BlockPos pos )
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{
return new MetaRotation( w, pos,true );
}