final variables and parameters
This commit is contained in:
@@ -45,11 +45,11 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(
|
||||
IBlockState state,
|
||||
Random rand,
|
||||
int fortune )
|
||||
final IBlockState state,
|
||||
final Random rand,
|
||||
final int fortune )
|
||||
{
|
||||
for( Item charged : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeItem().asSet() )
|
||||
for( final Item charged : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeItem().asSet() )
|
||||
{
|
||||
return charged;
|
||||
}
|
||||
@@ -59,9 +59,9 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
|
||||
|
||||
@Override
|
||||
public int damageDropped(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -71,10 +71,10 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
|
||||
|
||||
@Override
|
||||
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 )
|
||||
{
|
||||
@@ -112,7 +112,7 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
|
||||
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
ChargedOreFX fx = new ChargedOreFX( w, pos.getX() + xOff, pos.getY() + yOff, pos.getZ() + zOff, 0.0f, 0.0f, 0.0f );
|
||||
final ChargedOreFX fx = new ChargedOreFX( w, pos.getX() + xOff, pos.getY() + yOff, pos.getZ() + zOff, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@ public class QuartzGlassBlock extends AEBaseBlock
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
EnumFacing side )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side )
|
||||
{
|
||||
Material mat = w.getBlockState( pos ).getBlock().getMaterial();
|
||||
final Material mat = w.getBlockState( pos ).getBlock().getMaterial();
|
||||
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||
{
|
||||
if( w.getBlockState( pos ).getBlock().getRenderType() == this.getRenderType() )
|
||||
|
||||
@@ -44,10 +44,10 @@ public class QuartzLampBlock extends QuartzGlassBlock
|
||||
|
||||
@Override
|
||||
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 )
|
||||
{
|
||||
@@ -56,11 +56,11 @@ public class QuartzLampBlock extends QuartzGlassBlock
|
||||
|
||||
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 + pos.getX() + d0, 0.5 + pos.getY() + d1, 0.5 + pos.getZ() + d2, 0.0D, 0.0D, 0.0D );
|
||||
final VibrantFX fx = new VibrantFX( w, 0.5 + pos.getX() + d0, 0.5 + pos.getY() + d1, 0.5 + pos.getZ() + d2, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ public class QuartzOreBlock extends AEBaseBlock
|
||||
|
||||
@Override
|
||||
public int getMixedBrightnessForBlock(
|
||||
IBlockAccess worldIn,
|
||||
BlockPos pos )
|
||||
final IBlockAccess worldIn,
|
||||
final BlockPos pos )
|
||||
{
|
||||
int j1 = super.getMixedBrightnessForBlock( worldIn, pos );
|
||||
if( this.enhanceBrightness )
|
||||
@@ -106,18 +106,18 @@ public class QuartzOreBlock extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped( Random rand )
|
||||
public int quantityDropped( final Random rand )
|
||||
{
|
||||
return 1 + rand.nextInt( 2 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(
|
||||
IBlockState state, /* is null */
|
||||
Random rand,
|
||||
int fortune )
|
||||
final IBlockState state, /* is null */
|
||||
final Random rand,
|
||||
final int fortune )
|
||||
{
|
||||
for( Item crystalItem : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeItem().asSet() )
|
||||
for( final Item crystalItem : AEApi.instance().definitions().materials().certusQuartzCrystal().maybeItem().asSet() )
|
||||
{
|
||||
return crystalItem;
|
||||
}
|
||||
@@ -127,17 +127,17 @@ public class QuartzOreBlock extends AEBaseBlock
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
float chance,
|
||||
int fortune )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final float chance,
|
||||
final int fortune )
|
||||
{
|
||||
super.dropBlockAsItemWithChance( w, pos, state, chance, fortune );
|
||||
|
||||
if( this.getItemDropped( state, w.rand, fortune ) != Item.getItemFromBlock( this ) )
|
||||
{
|
||||
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||
final int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||
|
||||
this.dropXpOnBlockBreak( w, pos, xp );
|
||||
}
|
||||
@@ -145,9 +145,9 @@ public class QuartzOreBlock extends AEBaseBlock
|
||||
|
||||
@Override
|
||||
public int damageDropped(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class QuartzOreBlock 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( null, rand, fortune ) )
|
||||
{
|
||||
@@ -175,17 +175,17 @@ public class QuartzOreBlock 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;
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ public class QuartzPillarBlock extends AEBaseBlock implements IOrientableBlock
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(
|
||||
int meta )
|
||||
final int meta )
|
||||
{
|
||||
return getDefaultState();
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class QuartzPillarBlock extends AEBaseBlock implements IOrientableBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable( final IBlockAccess w,BlockPos pos )
|
||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
return new MetaRotation( w, pos,false );
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SkyStoneBlock extends AEBaseBlock
|
||||
private static final double BREAK_SPEAK_THRESHOLD = 7.0;
|
||||
private final SkystoneType type;
|
||||
|
||||
public SkyStoneBlock( SkystoneType type )
|
||||
public SkyStoneBlock( final SkystoneType type )
|
||||
{
|
||||
super( Material.rock, Optional.of( type.name() ) );
|
||||
this.setHardness( 50 );
|
||||
@@ -63,11 +63,11 @@ public class SkyStoneBlock extends AEBaseBlock
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void breakFaster( PlayerEvent.BreakSpeed event )
|
||||
public void breakFaster( final PlayerEvent.BreakSpeed event )
|
||||
{
|
||||
if( event.state.getBlock() == 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 )
|
||||
@@ -83,7 +83,7 @@ public class SkyStoneBlock extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded( World w, BlockPos pos, IBlockState state )
|
||||
public void onBlockAdded( final World w, final BlockPos pos, final IBlockState state )
|
||||
{
|
||||
super.onBlockAdded( w, pos, state );
|
||||
if( Platform.isServer() )
|
||||
@@ -93,7 +93,7 @@ public class SkyStoneBlock extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock( World w, BlockPos pos, IBlockState state )
|
||||
public void breakBlock( final World w, final BlockPos pos, final IBlockState state )
|
||||
{
|
||||
super.breakBlock( w, pos, state );
|
||||
|
||||
@@ -104,7 +104,7 @@ public class SkyStoneBlock extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ import appeng.core.features.AEFeature;
|
||||
|
||||
public class BlockStairCommon extends AEBaseStairBlock
|
||||
{
|
||||
public BlockStairCommon( Block block, String type )
|
||||
public BlockStairCommon( final Block block, final String type )
|
||||
{
|
||||
super( block, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), type );
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public enum DecorativeStairIdentifier implements Identifier
|
||||
*
|
||||
* @see net.minecraftforge.fml.common.registry.GameRegistry#registerBlock(Block, String)
|
||||
*/
|
||||
DecorativeStairIdentifier( @Nonnull String name )
|
||||
DecorativeStairIdentifier( @Nonnull final String name )
|
||||
{
|
||||
Preconditions.checkNotNull( name );
|
||||
Preconditions.checkArgument( !name.isEmpty() );
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.block.Block;
|
||||
*/
|
||||
public class FluixStairBlock extends BlockStairCommon
|
||||
{
|
||||
public FluixStairBlock( Block block, String type )
|
||||
public FluixStairBlock( final Block block, final String type )
|
||||
{
|
||||
super( block, type );
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class FluixStairSupplier implements Supplier<BlockStairs>
|
||||
{
|
||||
private final Supplier<Block> fluixBlockSupplier;
|
||||
|
||||
public FluixStairSupplier( Supplier<Block> fluixBlockSupplier )
|
||||
public FluixStairSupplier( final Supplier<Block> fluixBlockSupplier )
|
||||
{
|
||||
Preconditions.checkNotNull( fluixBlockSupplier );
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class StairBlockDefinition implements IBlockDefinition
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameAs( IBlockAccess world, BlockPos pos )
|
||||
public boolean isSameAs( final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class StairBlockDefinition implements IBlockDefinition
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<ItemStack> maybeStack( int stackSize )
|
||||
public Optional<ItemStack> maybeStack( final int stackSize )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class StairBlockDefinition implements IBlockDefinition
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameAs( ItemStack comparableStack )
|
||||
public boolean isSameAs( final ItemStack comparableStack )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user