Changed access to use this qualifier

This commit is contained in:
yueh
2014-12-29 15:13:47 +01:00
parent 2a5e57a59b
commit f471513bd0
604 changed files with 11573 additions and 11573 deletions
@@ -45,8 +45,8 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
public ToolBiometricCard() {
super( ToolBiometricCard.class );
setFeature( EnumSet.of( AEFeature.Security ) );
setMaxStackSize( 1 );
this.setFeature( EnumSet.of( AEFeature.Security ) );
this.setMaxStackSize( 1 );
if ( Platform.isClient() )
MinecraftForgeClient.registerItemRenderer( this, new ToolBiometricCardRender() );
}
@@ -54,7 +54,7 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
@Override
public String getItemStackDisplayName(ItemStack is)
{
GameProfile username = getProfile( is );
GameProfile username = this.getProfile( is );
return username != null ? super.getItemStackDisplayName( is ) + " - " + username.getName() : super.getItemStackDisplayName( is );
}
@@ -65,7 +65,7 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
{
if ( par2EntityPlayer.capabilities.isCreativeMode )
is = par2EntityPlayer.getCurrentEquippedItem();
encode( is, (EntityPlayer) target );
this.encode( is, (EntityPlayer) target );
par2EntityPlayer.swingItem();
return true;
}
@@ -77,7 +77,7 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
{
if ( p.isSneaking() )
{
encode( is, p );
this.encode( is, p );
p.swingItem();
return is;
}
@@ -87,18 +87,18 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
private void encode(ItemStack is, EntityPlayer p)
{
GameProfile username = getProfile( is );
GameProfile username = this.getProfile( is );
if (username != null && username.equals(p.getGameProfile()))
setProfile( is, null );
this.setProfile( is, null );
else
setProfile( is, p.getGameProfile() );
this.setProfile( is, p.getGameProfile() );
}
@Override
public void addCheckedInformation(ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
{
EnumSet<SecurityPermissions> perms = getPermissions( stack );
EnumSet<SecurityPermissions> perms = this.getPermissions( stack );
if ( perms.isEmpty() )
lines.add( GuiText.NoPermissions.getLocal() );
else
@@ -181,6 +181,6 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
@Override
public void registerPermissions(ISecurityRegistry register, IPlayerRegistry pr, ItemStack is)
{
register.addPlayer( pr.getID( getProfile( is ) ), getPermissions( is ) );
register.addPlayer( pr.getID( this.getProfile( is ) ), this.getPermissions( is ) );
}
}
@@ -41,8 +41,8 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
public ToolMemoryCard() {
super( ToolMemoryCard.class );
setFeature( EnumSet.of( AEFeature.Core ) );
setMaxStackSize( 1 );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setMaxStackSize( 1 );
}
/**
@@ -69,11 +69,11 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
@Override
public void addCheckedInformation(ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
{
lines.add( getLocalizedName( getSettingsName( stack ) + ".name", getSettingsName( stack ) ) );
lines.add( this.getLocalizedName( this.getSettingsName( stack ) + ".name", this.getSettingsName( stack ) ) );
NBTTagCompound data = getData( stack );
NBTTagCompound data = this.getData( stack );
if ( data.hasKey( "tooltip" ) )
lines.add( StatCollector.translateToLocal( getLocalizedName( data.getString( "tooltip" ) + ".name", data.getString( "tooltip" ) ) ) );
lines.add( StatCollector.translateToLocal( this.getLocalizedName( data.getString( "tooltip" ) + ".name", data.getString( "tooltip" ) ) ) );
}
@Override
@@ -83,7 +83,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
if ( mop == null )
{
onItemUseFirst( it, p, w, 0, 0, 0, -1, 0, 0, 0 );
this.onItemUseFirst( it, p, w, 0, 0, 0, -1, 0, 0, 0 );
}
else
{
@@ -92,7 +92,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
int k = mop.blockZ;
if ( w.getBlock( i, j, k ).isAir( w, i, j, k ) )
onItemUseFirst( it, p, w, 0, 0, 0, -1, 0, 0, 0 );
this.onItemUseFirst( it, p, w, 0, 0, 0, -1, 0, 0, 0 );
}
}
@@ -41,8 +41,8 @@ public class ToolChargedStaff extends AEBasePoweredItem
public ToolChargedStaff()
{
super( ToolChargedStaff.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.ChargedStaff, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.chargedStaffBattery;
this.setFeature( EnumSet.of( AEFeature.ChargedStaff, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.chargedStaffBattery;
}
@Override
@@ -50,7 +50,7 @@ public class ToolChargedStaff extends AEBasePoweredItem
{
if ( this.getAECurrentPower( item ) > 300 )
{
extractAEPower( item, 300 );
this.extractAEPower( item, 300 );
if ( Platform.isServer() )
{
for ( int x = 0; x < 2; x++ )
@@ -100,8 +100,8 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
public ToolColorApplicator()
{
super( ToolColorApplicator.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.ColorApplicator, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.colorApplicatorBattery;
this.setFeature( EnumSet.of( AEFeature.ColorApplicator, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.colorApplicatorBattery;
if ( Platform.isClient() )
MinecraftForgeClient.registerItemRenderer( this, new ToolColorApplicatorRender() );
}
@@ -119,7 +119,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
Block blk = w.getBlock( x, y, z );
double powerPerUse = 100;
ItemStack paintBall = getColor( is );
ItemStack paintBall = this.getColor( is );
IMEInventory<IAEItemStack> inv = AEApi.instance().registries().cell().getCellInventory( is, null, StorageChannel.ITEMS );
if ( inv != null )
@@ -144,12 +144,12 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
// clean cables.
if ( te instanceof IColorableTile )
{
if ( getAECurrentPower( is ) > powerPerUse && ( ( IColorableTile ) te ).getColor() != AEColor.Transparent )
if ( this.getAECurrentPower( is ) > powerPerUse && ( ( IColorableTile ) te ).getColor() != AEColor.Transparent )
{
if ( ( ( IColorableTile ) te ).recolourBlock( orientation, AEColor.Transparent, p ) )
{
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
extractAEPower( is, powerPerUse );
this.extractAEPower( is, powerPerUse );
return true;
}
}
@@ -158,25 +158,25 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
// clean paint balls..
Block testBlk = w.getBlock( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ );
TileEntity painted = w.getTileEntity( x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ );
if ( getAECurrentPower( is ) > powerPerUse && testBlk instanceof BlockPaint && painted instanceof TilePaint )
if ( this.getAECurrentPower( is ) > powerPerUse && testBlk instanceof BlockPaint && painted instanceof TilePaint )
{
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
extractAEPower( is, powerPerUse );
this.extractAEPower( is, powerPerUse );
( ( TilePaint ) painted ).cleanSide( orientation.getOpposite() );
return true;
}
}
else if ( paintBall != null )
{
AEColor color = getColorFromItem( paintBall );
AEColor color = this.getColorFromItem( paintBall );
if ( color != null && getAECurrentPower( is ) > powerPerUse )
if ( color != null && this.getAECurrentPower( is ) > powerPerUse )
{
if ( color != AEColor.Transparent
&& recolourBlock( blk, ForgeDirection.getOrientation( side ), w, x, y, z, ForgeDirection.getOrientation( side ), color, p ) )
&& this.recolourBlock( blk, ForgeDirection.getOrientation( side ), w, x, y, z, ForgeDirection.getOrientation( side ), color, p ) )
{
inv.extractItems( AEItemStack.create( paintBall ), Actionable.MODULATE, new BaseActionSource() );
extractAEPower( is, powerPerUse );
this.extractAEPower( is, powerPerUse );
return true;
}
}
@@ -186,7 +186,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
if ( p.isSneaking() )
{
cycleColors( is, paintBall, 1 );
this.cycleColors( is, paintBall, 1 );
}
return false;
@@ -197,7 +197,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
{
String extra = GuiText.Empty.getLocal();
AEColor selected = getActiveColor( par1ItemStack );
AEColor selected = this.getActiveColor( par1ItemStack );
if ( selected != null && Platform.isClient() )
extra = Platform.gui_localize( selected.unlocalizedName );
@@ -207,7 +207,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
public AEColor getActiveColor( ItemStack tol )
{
return getColorFromItem( getColor( tol ) );
return this.getColorFromItem( this.getColor( tol ) );
}
public AEColor getColorFromItem( ItemStack paintBall )
@@ -248,7 +248,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
return oldColor;
}
return findNextColor( is, null, 0 );
return this.findNextColor( is, null, 0 );
}
private ItemStack findNextColor( ItemStack is, ItemStack anchor, int scrollOffset )
@@ -306,7 +306,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
}
if ( newColor != null )
setColor( is, newColor );
this.setColor( is, newColor );
return newColor;
}
@@ -383,11 +383,11 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
{
if ( paintBall == null )
{
setColor( is, getColor( is ) );
this.setColor( is, this.getColor( is ) );
}
else
{
setColor( is, findNextColor( is, paintBall, i ) );
this.setColor( is, this.findNextColor( is, paintBall, i ) );
}
}
@@ -513,7 +513,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
@Override
public void onWheel( ItemStack is, boolean up )
{
cycleColors( is, getColor( is ), up ? 1 : -1 );
this.cycleColors( is, this.getColor( is ), up ? 1 : -1 );
}
}
@@ -63,8 +63,8 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
public ToolEntropyManipulator()
{
super( ToolEntropyManipulator.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.EntropyManipulator, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.entropyManipulatorBattery;
this.setFeature( EnumSet.of( AEFeature.EntropyManipulator, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.entropyManipulatorBattery;
coolDown = new Hashtable<Combo, InWorldToolOperationResult>();
coolDown.put( new Combo( Blocks.stone, 0 ), new InWorldToolOperationResult( new ItemStack( Blocks.cobblestone ) ) );
@@ -124,14 +124,14 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
public Combo( Block b, int m )
{
blk = b;
meta = m;
this.blk = b;
this.meta = m;
}
@Override
public int hashCode()
{
return blk.hashCode() ^ meta;
return this.blk.hashCode() ^ this.meta;
}
@Override
@@ -139,10 +139,10 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{
if ( obj == null )
return false;
if ( getClass() != obj.getClass() )
if ( this.getClass() != obj.getClass() )
return false;
Combo other = ( Combo ) obj;
return blk == other.blk && meta == other.meta;
return this.blk == other.blk && this.meta == other.meta;
}
}
@@ -200,7 +200,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{
if ( this.getAECurrentPower( item ) > 1600 )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
target.setFire( 8 );
}
@@ -226,7 +226,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{
if ( Platform.hasPermissions( new DimensionalCoord( w, x, y, z ), p ) )
{
onItemUse( item, p, w, x, y, z, 0, 0.0F, 0.0F, 0.0F );
this.onItemUse( item, p, w, x, y, z, 0, 0.0F, 0.0F, 0.0F );
}
}
}
@@ -250,7 +250,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
{
if ( canCool( Blk, Metadata ) )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
cool( Blk, Metadata, w, x, y, z );
return true;
}
@@ -273,7 +273,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
if ( canHeat( Blk, Metadata ) )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
heat( Blk, Metadata, w, x, y, z );
return true;
}
@@ -308,7 +308,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
if ( hasFurnaceable && canFurnaceable )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
InWorldToolOperationResult or = InWorldToolOperationResult.getBlockOperationResult( out.toArray( new ItemStack[out.size()] ) );
w.playSoundEffect( x + 0.5D, y + 0.5D, z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
@@ -340,7 +340,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
if ( w.isAirBlock( x, y, z ) )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
w.playSoundEffect( x + 0.5D, y + 0.5D, z + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
w.setBlock( x, y, z, Blocks.fire );
}
@@ -84,8 +84,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
public ToolMassCannon()
{
super( ToolMassCannon.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.MatterCannon, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.matterCannonBattery;
this.setFeature( EnumSet.of( AEFeature.MatterCannon, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.matterCannonBattery;
}
@Override
@@ -120,7 +120,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
{
int shots = 1;
CellUpgrades cu = ( CellUpgrades ) getUpgradesInventory( item );
CellUpgrades cu = ( CellUpgrades ) this.getUpgradesInventory( item );
if ( cu != null )
shots += cu.getInstalledUpgrades( Upgrades.SPEED );
@@ -134,7 +134,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
shots = Math.min( shots, ( int ) aeAmmo.getStackSize() );
for ( int sh = 0; sh < shots; sh++ )
{
extractAEPower( item, 1600 );
this.extractAEPower( item, 1600 );
if ( Platform.isClient() )
return item;
@@ -174,13 +174,13 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
ItemStack type = ( ( IAEItemStack ) aeAmmo ).getItemStack();
if ( type.getItem() instanceof ItemPaintBall )
{
shootPaintBalls( type, w, p, vec3, vec31, direction, d0, d1, d2 );
this.shootPaintBalls( type, w, p, vec3, vec31, direction, d0, d1, d2 );
}
return item;
}
else
{
standardAmmo( penetration, w, p, vec3, vec31, direction, d0, d1, d2 );
this.standardAmmo( penetration, w, p, vec3, vec31, direction, d0, d1, d2 );
}
}
@@ -62,8 +62,8 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
public ToolPortableCell()
{
super( ToolPortableCell.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.portableCellBattery;
this.setFeature( EnumSet.of( AEFeature.PortableCell, AEFeature.StorageCells, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.portableCellBattery;
}
@SideOnly(Side.CLIENT)
@@ -55,8 +55,8 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
public ToolWirelessTerminal()
{
super( ToolWirelessTerminal.class, Optional.<String> absent() );
setFeature( EnumSet.of( AEFeature.WirelessAccessTerminal, AEFeature.PoweredTools ) );
maxStoredPower = AEConfig.instance.wirelessTerminalBattery;
this.setFeature( EnumSet.of( AEFeature.WirelessAccessTerminal, AEFeature.PoweredTools ) );
this.maxStoredPower = AEConfig.instance.wirelessTerminalBattery;
}
@SideOnly(Side.CLIENT)
@@ -110,7 +110,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
@Override
public boolean hasPower( EntityPlayer player, double amt, ItemStack is )
{
return getAECurrentPower( is ) >= amt;
return this.getAECurrentPower( is ) >= amt;
}
@Override
@@ -47,9 +47,9 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
public AERootPoweredItem( Class c, Optional<String> subName )
{
super( c, subName );
setMaxDamage( 32 );
hasSubtypes = false;
setFull3D();
this.setMaxDamage( 32 );
this.hasSubtypes = false;
this.setFull3D();
}
@Override
@@ -57,7 +57,7 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
{
NBTTagCompound tag = stack.getTagCompound();
double internalCurrentPower = 0;
double internalMaxPower = getAEMaxPower( stack );
double internalMaxPower = this.getAEMaxPower( stack );
if ( tag != null )
{
@@ -84,8 +84,8 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
ItemStack charged = new ItemStack( this, 1 );
NBTTagCompound tag = Platform.openNbtData( charged );
tag.setDouble( "internalCurrentPower", getAEMaxPower( charged ) );
tag.setDouble( "internalMaxPower", getAEMaxPower( charged ) );
tag.setDouble( "internalCurrentPower", this.getAEMaxPower( charged ) );
tag.setDouble( "internalMaxPower", this.getAEMaxPower( charged ) );
list.add( charged );
}
@@ -98,7 +98,7 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
@Override
public double getDurabilityForDisplay( ItemStack is )
{
return 1 - getAECurrentPower( is ) / getAEMaxPower( is );
return 1 - this.getAECurrentPower( is ) / this.getAEMaxPower( is );
}
@Override
@@ -120,14 +120,14 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
{
if ( simulate )
{
int requiredEU = ( int ) PowerUnits.AE.convertTo( PowerUnits.EU, getAEMaxPower( is ) - getAECurrentPower( is ) );
int requiredEU = ( int ) PowerUnits.AE.convertTo( PowerUnits.EU, this.getAEMaxPower( is ) - this.getAECurrentPower( is ) );
if ( amount < requiredEU )
return 0;
return amount - requiredEU;
}
else
{
double powerRemainder = injectAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
double powerRemainder = this.injectAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
return PowerUnits.AE.convertTo( PowerUnits.EU, powerRemainder );
}
}
@@ -135,21 +135,21 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
@Override
public double injectAEPower( ItemStack is, double amt )
{
return getInternalBattery( is, batteryOperation.INJECT, amt );
return this.getInternalBattery( is, batteryOperation.INJECT, amt );
}
@Override
public double extractAEPower( ItemStack is, double amt )
{
return getInternalBattery( is, batteryOperation.EXTRACT, amt );
return this.getInternalBattery( is, batteryOperation.EXTRACT, amt );
}
private double getInternalBattery( ItemStack is, batteryOperation op, double adjustment )
{
NBTTagCompound data = Platform.openNbtData( is );
double currentStorage = data.getDouble( EnergyVar );
double maxStorage = getAEMaxPower( is );
double currentStorage = data.getDouble( this.EnergyVar );
double maxStorage = this.getAEMaxPower( is );
switch ( op )
{
@@ -158,19 +158,19 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
if ( currentStorage > maxStorage )
{
double diff = currentStorage - maxStorage;
data.setDouble( EnergyVar, maxStorage );
data.setDouble( this.EnergyVar, maxStorage );
return diff;
}
data.setDouble( EnergyVar, currentStorage );
data.setDouble( this.EnergyVar, currentStorage );
return 0;
case EXTRACT:
if ( currentStorage > adjustment )
{
currentStorage -= adjustment;
data.setDouble( EnergyVar, currentStorage );
data.setDouble( this.EnergyVar, currentStorage );
return adjustment;
}
data.setDouble( EnergyVar, 0 );
data.setDouble( this.EnergyVar, 0 );
return currentStorage;
default:
break;
@@ -182,13 +182,13 @@ public class AERootPoweredItem extends AEBaseItem implements IAEItemPowerStorage
@Override
public double getAEMaxPower( ItemStack is )
{
return maxStoredPower;
return this.maxStoredPower;
}
@Override
public double getAECurrentPower( ItemStack is )
{
return getInternalBattery( is, batteryOperation.STORAGE, 0 );
return this.getInternalBattery( is, batteryOperation.STORAGE, 0 );
}
@Override
@@ -48,12 +48,12 @@ public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpe
public double charge( ItemStack is, double amount, int tier, boolean ignoreTransferLimit, boolean simulate )
{
double addedAmt = amount;
double limit = getTransferLimit( is );
double limit = this.getTransferLimit( is );
if ( !ignoreTransferLimit && amount > limit )
addedAmt = limit;
return addedAmt - ( ( int ) injectExternalPower( PowerUnits.EU, is, addedAmt, simulate ) );
return addedAmt - ( ( int ) this.injectExternalPower( PowerUnits.EU, is, addedAmt, simulate ) );
}
@Override
@@ -65,22 +65,22 @@ public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpe
@Override
public double getCharge( ItemStack is )
{
return ( int ) PowerUnits.AE.convertTo( PowerUnits.EU, getAECurrentPower( is ) );
return ( int ) PowerUnits.AE.convertTo( PowerUnits.EU, this.getAECurrentPower( is ) );
}
@Override
public boolean canUse( ItemStack is, double amount )
{
return getCharge( is ) > amount;
return this.getCharge( is ) > amount;
}
@Override
public boolean use( ItemStack is, double amount, EntityLivingBase entity )
{
if ( canUse( is, amount ) )
if ( this.canUse( is, amount ) )
{
// use the power..
extractAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
this.extractAEPower( is, PowerUnits.EU.convertTo( PowerUnits.AE, amount ) );
return true;
}
return false;
@@ -119,7 +119,7 @@ public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpe
@Override
public double getMaxCharge( ItemStack itemStack )
{
return PowerUnits.AE.convertTo( PowerUnits.EU, getAEMaxPower( itemStack ) );
return PowerUnits.AE.convertTo( PowerUnits.EU, this.getAEMaxPower( itemStack ) );
}
@Override
@@ -131,7 +131,7 @@ public class IC2 extends AERootPoweredItem implements IElectricItemManager, ISpe
@Override
public double getTransferLimit( ItemStack itemStack )
{
return Math.max( 32, getMaxCharge( itemStack ) / 200 );
return Math.max( 32, this.getMaxCharge( itemStack ) / 200 );
}
@Override
@@ -41,7 +41,7 @@ public class RedstoneFlux extends IC2 implements IEnergyContainerItem
@Override
public int receiveEnergy( ItemStack is, int maxReceive, boolean simulate )
{
return maxReceive - ( int ) injectExternalPower( PowerUnits.RF, is, maxReceive, simulate );
return maxReceive - ( int ) this.injectExternalPower( PowerUnits.RF, is, maxReceive, simulate );
}
@Override
@@ -53,13 +53,13 @@ public class RedstoneFlux extends IC2 implements IEnergyContainerItem
@Override
public int getEnergyStored( ItemStack is )
{
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, getAECurrentPower( is ) );
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, this.getAECurrentPower( is ) );
}
@Override
public int getMaxEnergyStored( ItemStack is )
{
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, getAEMaxPower( is ) );
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, this.getAEMaxPower( is ) );
}
}
@@ -41,7 +41,7 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
public ToolQuartzAxe( AEFeature Type )
{
super( ToolMaterial.IRON );
this.feature = new ItemFeatureHandler( EnumSet.of( type = Type, AEFeature.QuartzAxe ), this, this, Optional.of( Type.name() ) );
this.feature = new ItemFeatureHandler( EnumSet.of( this.type = Type, AEFeature.QuartzAxe ), this, this, Optional.of( Type.name() ) );
}
@Override
@@ -59,6 +59,6 @@ public class ToolQuartzAxe extends ItemAxe implements IAEFeature
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( type, a, b );
return Platform.canRepair( this.type, a, b );
}
}
@@ -46,9 +46,9 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
{
super( ToolQuartzCuttingKnife.class, Optional.of( Type.name() ) );
setFeature( EnumSet.of( type = Type, AEFeature.QuartzKnife ) );
setMaxDamage( 50 );
setMaxStackSize( 1 );
this.setFeature( EnumSet.of( this.type = Type, AEFeature.QuartzKnife ) );
this.setMaxDamage( 50 );
this.setMaxStackSize( 1 );
}
@Override
@@ -77,7 +77,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( type, a, b );
return Platform.canRepair( this.type, a, b );
}
@Override
@@ -49,7 +49,7 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
@Override
public IFeatureHandler handler()
{
return handler;
return this.handler;
}
@Override
@@ -61,6 +61,6 @@ public class ToolQuartzHoe extends ItemHoe implements IAEFeature
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( feature, a, b );
return Platform.canRepair( this.feature, a, b );
}
}
@@ -61,6 +61,6 @@ public class ToolQuartzPickaxe extends ItemPickaxe implements IAEFeature
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( type, a, b );
return Platform.canRepair( this.type, a, b );
}
}
@@ -42,13 +42,13 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
{
super( ToolMaterial.IRON );
this.handler = new ItemFeatureHandler( EnumSet.of( type = Type, AEFeature.QuartzSpade ), this, this, Optional.of( Type.name() ) );
this.handler = new ItemFeatureHandler( EnumSet.of( this.type = Type, AEFeature.QuartzSpade ), this, this, Optional.of( Type.name() ) );
}
@Override
public IFeatureHandler handler()
{
return handler;
return this.handler;
}
@Override
@@ -60,6 +60,6 @@ public class ToolQuartzSpade extends ItemSpade implements IAEFeature
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( type, a, b );
return Platform.canRepair( this.type, a, b );
}
}
@@ -41,13 +41,13 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
public ToolQuartzSword( AEFeature Type )
{
super( ToolMaterial.IRON );
feature = new ItemFeatureHandler( EnumSet.of( type = Type, AEFeature.QuartzSword ), this, this, Optional.of( Type.name() ) );
this.feature = new ItemFeatureHandler( EnumSet.of( this.type = Type, AEFeature.QuartzSword ), this, this, Optional.of( Type.name() ) );
}
@Override
public IFeatureHandler handler()
{
return feature;
return this.feature;
}
@Override
@@ -59,6 +59,6 @@ public class ToolQuartzSword extends ItemSword implements IAEFeature
@Override
public boolean getIsRepairable( ItemStack a, ItemStack b )
{
return Platform.canRepair( type, a, b );
return Platform.canRepair( this.type, a, b );
}
}