final variables and parameters
seeing some methods it does actually help to enforce the parameters
This commit is contained in:
@@ -52,9 +52,9 @@ public class BlockQuartzGlass extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered( IBlockAccess w, int x, int y, int z, int side )
|
||||
public boolean shouldSideBeRendered( final IBlockAccess w, final int x, final int y, final int z, final int side )
|
||||
{
|
||||
Material mat = w.getBlock( x, y, z ).getMaterial();
|
||||
final Material mat = w.getBlock( x, y, z ).getMaterial();
|
||||
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||
{
|
||||
if( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||
|
||||
@@ -46,7 +46,7 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
public void randomDisplayTick( final World w, final int x, final int y, final int z, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
@@ -55,11 +55,11 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
||||
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
double d1 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
double d2 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
final double d0 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
final double d1 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
final double d2 = ( r.nextFloat() - 0.5F ) * 0.96D;
|
||||
|
||||
VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
||||
final VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@@ -78,11 +78,11 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void breakFaster( PlayerEvent.BreakSpeed event )
|
||||
public void breakFaster( final PlayerEvent.BreakSpeed event )
|
||||
{
|
||||
if( event.block == this && event.entityPlayer != null )
|
||||
{
|
||||
ItemStack is = event.entityPlayer.inventory.getCurrentItem();
|
||||
final ItemStack is = event.entityPlayer.inventory.getCurrentItem();
|
||||
int level = -1;
|
||||
|
||||
if( is != null && is.getItem() != null )
|
||||
@@ -98,13 +98,13 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped( int meta )
|
||||
public int damageDropped( final int meta )
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player )
|
||||
public ItemStack getPickBlock( final MovingObjectPosition target, final World world, final int x, final int y, final int z, final EntityPlayer player )
|
||||
{
|
||||
final ItemStack is = super.getPickBlock( target, world, x, y, z, player );
|
||||
is.setItemDamage( world.getBlockMetadata( x, y, z ) );
|
||||
@@ -113,7 +113,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded( World w, int x, int y, int z )
|
||||
public void onBlockAdded( final World w, final int x, final int y, final int z )
|
||||
{
|
||||
super.onBlockAdded( w, x, y, z );
|
||||
if( Platform.isServer() )
|
||||
@@ -140,7 +140,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
@@ -162,7 +162,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void registerBlockIcons( IIconRegister ir )
|
||||
public void registerBlockIcons( final IIconRegister ir )
|
||||
{
|
||||
super.registerBlockIcons( ir );
|
||||
this.block = ir.registerIcon( this.getTextureName() + ".Block" );
|
||||
@@ -172,7 +172,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public IIcon getIcon( int direction, int metadata )
|
||||
public IIcon getIcon( final int direction, final int metadata )
|
||||
{
|
||||
if( metadata == 1 )
|
||||
{
|
||||
@@ -190,14 +190,14 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRenderStateByMeta( int metadata )
|
||||
public void setRenderStateByMeta( final int metadata )
|
||||
{
|
||||
this.getRendererInstance().setTemporaryRenderIcon( this.getIcon( 0, metadata ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
super.getCheckedSubBlocks( item, tabs, itemStacks );
|
||||
|
||||
@@ -207,7 +207,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock( World w, int x, int y, int z, Block b, int metadata )
|
||||
public void breakBlock( final World w, final int x, final int y, final int z, final Block b, final int metadata )
|
||||
{
|
||||
super.breakBlock( w, x, y, z, b, metadata );
|
||||
if( Platform.isServer() )
|
||||
|
||||
@@ -63,7 +63,7 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMixedBrightnessForBlock( IBlockAccess par1iBlockAccess, int par2, int par3, int par4 )
|
||||
public int getMixedBrightnessForBlock( final IBlockAccess par1iBlockAccess, final int par2, final int par3, final int par4 )
|
||||
{
|
||||
int j1 = super.getMixedBrightnessForBlock( par1iBlockAccess, par2, par3, par4 );
|
||||
if( this.enhanceBrightness )
|
||||
@@ -89,16 +89,16 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped( Random rand )
|
||||
public int quantityDropped( final Random rand )
|
||||
{
|
||||
return 1 + rand.nextInt( 2 );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Item getItemDropped( int id, Random rand, int meta )
|
||||
public Item getItemDropped( final int id, final Random rand, final int meta )
|
||||
{
|
||||
for( Item crystalItem : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeItem().asSet() )
|
||||
for( final Item crystalItem : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeItem().asSet() )
|
||||
{
|
||||
return crystalItem;
|
||||
}
|
||||
@@ -107,22 +107,22 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance( World w, int x, int y, int z, int blockID, float something, int meta )
|
||||
public void dropBlockAsItemWithChance( final World w, final int x, final int y, final int z, final int blockID, final float something, final int meta )
|
||||
{
|
||||
super.dropBlockAsItemWithChance( w, x, y, z, blockID, something, meta );
|
||||
|
||||
if( this.getItemDropped( blockID, w.rand, meta ) != Item.getItemFromBlock( this ) )
|
||||
{
|
||||
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||
final int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||
|
||||
this.dropXpOnBlockBreak( w, x, y, z, xp );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped( int id )
|
||||
public int damageDropped( final int id )
|
||||
{
|
||||
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return crystalStack.getItemDamage();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDroppedWithBonus( int fortune, Random rand )
|
||||
public int quantityDroppedWithBonus( final int fortune, final Random rand )
|
||||
{
|
||||
if( fortune > 0 && Item.getItemFromBlock( this ) != this.getItemDropped( 0, rand, fortune ) )
|
||||
{
|
||||
@@ -150,17 +150,17 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
}
|
||||
|
||||
public void setBoostBrightnessLow( int boostBrightnessLow )
|
||||
public void setBoostBrightnessLow( final int boostBrightnessLow )
|
||||
{
|
||||
this.boostBrightnessLow = boostBrightnessLow;
|
||||
}
|
||||
|
||||
public void setBoostBrightnessHigh( int boostBrightnessHigh )
|
||||
public void setBoostBrightnessHigh( final int boostBrightnessHigh )
|
||||
{
|
||||
this.boostBrightnessHigh = boostBrightnessHigh;
|
||||
}
|
||||
|
||||
public void setEnhanceBrightness( boolean enhanceBrightness )
|
||||
public void setEnhanceBrightness( final boolean enhanceBrightness )
|
||||
{
|
||||
this.enhanceBrightness = enhanceBrightness;
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ public class OreQuartzCharged extends OreQuartz
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Item getItemDropped( int id, Random rand, int meta )
|
||||
public Item getItemDropped( final int id, final Random rand, final int meta )
|
||||
{
|
||||
for( Item charged : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeItem().asSet() )
|
||||
for( final Item charged : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeItem().asSet() )
|
||||
{
|
||||
return charged;
|
||||
}
|
||||
@@ -60,9 +60,9 @@ public class OreQuartzCharged extends OreQuartz
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped( int id )
|
||||
public int damageDropped( final int id )
|
||||
{
|
||||
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return crystalStack.getItemDamage();
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
public void randomDisplayTick( final World w, final int x, final int y, final int z, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
|
||||
final ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user