final variables and parameters
This commit is contained in:
@@ -37,7 +37,7 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
|
||||
private final AEFeature type;
|
||||
private final IFeatureHandler feature;
|
||||
|
||||
public ToolQuartzAxe( AEFeature type )
|
||||
public ToolQuartzAxe( final AEFeature type )
|
||||
{
|
||||
super( ToolMaterial.IRON );
|
||||
this.feature = new ItemFeatureHandler( EnumSet.of( this.type = type, AEFeature.QuartzAxe ), this, this, Optional.of( type.name() ) );
|
||||
@@ -56,7 +56,7 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.type, a, b );
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
{
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzCuttingKnife( AEFeature type )
|
||||
public ToolQuartzCuttingKnife( final AEFeature type )
|
||||
{
|
||||
super( Optional.of( type.name() ) );
|
||||
|
||||
@@ -54,14 +54,14 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer p,
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final ItemStack stack,
|
||||
final EntityPlayer p,
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( ItemStack it, World w, EntityPlayer p )
|
||||
public ItemStack onItemRightClick( final ItemStack it, final World w, final EntityPlayer p )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -82,7 +82,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.type, a, b );
|
||||
}
|
||||
@@ -94,20 +94,20 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem( ItemStack itemStack )
|
||||
public ItemStack getContainerItem( final ItemStack itemStack )
|
||||
{
|
||||
itemStack.setItemDamage( itemStack.getItemDamage() + 1 );
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem( ItemStack stack )
|
||||
public boolean hasContainerItem( final ItemStack stack )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiItemObject getGuiObject( ItemStack is, World world, BlockPos pos )
|
||||
public IGuiItemObject getGuiObject( final ItemStack is, final World world, final BlockPos pos )
|
||||
{
|
||||
return new QuartzKnifeObj( is );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
|
||||
private final AEFeature feature;
|
||||
private final IFeatureHandler handler;
|
||||
|
||||
public ToolQuartzHoe( AEFeature feature )
|
||||
public ToolQuartzHoe( final AEFeature feature )
|
||||
{
|
||||
super( ToolMaterial.IRON );
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.feature, a, b );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolQuartzPickaxe extends ItemPickaxe implements IAEFeature
|
||||
private final AEFeature type;
|
||||
private final IFeatureHandler feature;
|
||||
|
||||
public ToolQuartzPickaxe( AEFeature type )
|
||||
public ToolQuartzPickaxe( final AEFeature type )
|
||||
{
|
||||
super( ToolMaterial.IRON );
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ToolQuartzPickaxe extends ItemPickaxe implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.type, a, b );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
|
||||
private final AEFeature type;
|
||||
private final IFeatureHandler handler;
|
||||
|
||||
public ToolQuartzSpade( AEFeature type )
|
||||
public ToolQuartzSpade( final AEFeature type )
|
||||
{
|
||||
super( ToolMaterial.IRON );
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.type, a, b );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
|
||||
private final AEFeature type;
|
||||
private final IFeatureHandler feature;
|
||||
|
||||
public ToolQuartzSword( AEFeature type )
|
||||
public ToolQuartzSword( final AEFeature type )
|
||||
{
|
||||
super( ToolMaterial.IRON );
|
||||
this.feature = new ItemFeatureHandler( EnumSet.of( this.type = type, AEFeature.QuartzSword ), this, this, Optional.of( type.name() ) );
|
||||
@@ -56,7 +56,7 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable( ItemStack a, ItemStack b )
|
||||
public boolean getIsRepairable( final ItemStack a, final ItemStack b )
|
||||
{
|
||||
return Platform.canRepair( this.type, a, b );
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ import com.google.common.base.Optional;
|
||||
public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /*, IToolWrench */
|
||||
{
|
||||
|
||||
public ToolQuartzWrench( AEFeature type )
|
||||
public ToolQuartzWrench( final AEFeature type )
|
||||
{
|
||||
super( Optional.of( type.name() ) );
|
||||
|
||||
@@ -52,16 +52,16 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /*, IToolW
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final ItemStack stack,
|
||||
final EntityPlayer player,
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
Block b = world.getBlockState( pos ).getBlock();
|
||||
final Block b = world.getBlockState( pos ).getBlock();
|
||||
if( b != null && !player.isSneaking() && Platform.hasPermissions( new DimensionalCoord( world, pos ), player ) )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
@@ -81,18 +81,18 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /*, IToolW
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EntityPlayer player )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWrench(
|
||||
ItemStack wrench,
|
||||
EntityPlayer player,
|
||||
BlockPos pos )
|
||||
final ItemStack wrench,
|
||||
final EntityPlayer player,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user