Always use qualified access for fields and methods
This commit is contained in:
@@ -245,7 +245,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
@Override
|
||||
public TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall )
|
||||
{
|
||||
return doWork() ? TickRateModulation.FASTER : TickRateModulation.SLEEP;
|
||||
return this.doWork() ? TickRateModulation.FASTER : TickRateModulation.SLEEP;
|
||||
}
|
||||
|
||||
private boolean doWork()
|
||||
|
||||
@@ -287,15 +287,15 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
{
|
||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||
{
|
||||
return (T) itemHandler;
|
||||
return (T) this.itemHandler;
|
||||
}
|
||||
else if( capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY )
|
||||
{
|
||||
return (T) fluidHandler;
|
||||
return (T) this.fluidHandler;
|
||||
}
|
||||
else if( capability == Capabilities.STORAGE_MONITORABLE_ACCESSOR )
|
||||
{
|
||||
return (T) meHandler;
|
||||
return (T) this.meHandler;
|
||||
}
|
||||
return super.getCapability( capability, facing );
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
}
|
||||
if( !simulate && !stack.isEmpty() )
|
||||
{
|
||||
addPower( stack.getCount() );
|
||||
TileCondenser.this.addPower( stack.getCount() );
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
{
|
||||
if( doFill )
|
||||
{
|
||||
addPower( ( resource == null ? 0.0 : (double) resource.amount ) / 500.0 );
|
||||
TileCondenser.this.addPower( ( resource == null ? 0.0 : (double) resource.amount ) / 500.0 );
|
||||
}
|
||||
|
||||
return resource == null ? 0 : resource.amount;
|
||||
@@ -408,13 +408,13 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
@Override
|
||||
public IMEMonitor<IAEItemStack> getItemInventory()
|
||||
{
|
||||
return itemInventory;
|
||||
return this.itemInventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor<IAEFluidStack> getFluidInventory()
|
||||
{
|
||||
return fluidInventory;
|
||||
return this.fluidInventory;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -589,17 +589,17 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
{
|
||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||
{
|
||||
if( facing == getUp() )
|
||||
if( facing == this.getUp() )
|
||||
{
|
||||
return (T) topItemHandler;
|
||||
return (T) this.topItemHandler;
|
||||
}
|
||||
else if( facing == getUp().getOpposite() )
|
||||
else if( facing == this.getUp().getOpposite() )
|
||||
{
|
||||
return (T) bottomItemHandler;
|
||||
return (T) this.bottomItemHandler;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (T) sideItemHandler;
|
||||
return (T) this.sideItemHandler;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
@Override
|
||||
public int getSlots()
|
||||
{
|
||||
return insertSlot != extractSlot ? 2 : 1;
|
||||
return this.insertSlot != this.extractSlot ? 2 : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -682,11 +682,11 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
{
|
||||
if( slot == 0 )
|
||||
{
|
||||
return inv.getStackInSlot( insertSlot );
|
||||
return TileInscriber.this.inv.getStackInSlot( this.insertSlot );
|
||||
}
|
||||
else if( insertSlot != extractSlot && slot == 1 )
|
||||
else if( this.insertSlot != this.extractSlot && slot == 1 )
|
||||
{
|
||||
return inv.getStackInSlot( extractSlot );
|
||||
return TileInscriber.this.inv.getStackInSlot( this.extractSlot );
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
@@ -701,12 +701,12 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
|
||||
// If there's already an item stack in the slot, we don't allow insertion and don't do any other checks
|
||||
if( !inv.getStackInSlot( insertSlot ).isEmpty() )
|
||||
if( !TileInscriber.this.inv.getStackInSlot( this.insertSlot ).isEmpty() )
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
AdaptorIInventory adapter = new AdaptorIInventory( new WrapperInventoryRange( TileInscriber.this, insertSlot, 1, true ) );
|
||||
AdaptorIInventory adapter = new AdaptorIInventory( new WrapperInventoryRange( TileInscriber.this, this.insertSlot, 1, true ) );
|
||||
|
||||
if( simulate )
|
||||
{
|
||||
@@ -722,14 +722,14 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
@Nonnull
|
||||
public ItemStack extractItem( int slot, int amount, boolean simulate )
|
||||
{
|
||||
final int validExtractSlot = ( insertSlot == extractSlot ) ? 0 : 1;
|
||||
final int validExtractSlot = ( this.insertSlot == this.extractSlot ) ? 0 : 1;
|
||||
|
||||
if( slot != validExtractSlot || amount == 0 )
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
AdaptorIInventory adapter = new AdaptorIInventory( new WrapperInventoryRange( TileInscriber.this, extractSlot, 1, true ) );
|
||||
AdaptorIInventory adapter = new AdaptorIInventory( new WrapperInventoryRange( TileInscriber.this, this.extractSlot, 1, true ) );
|
||||
|
||||
if( simulate )
|
||||
{
|
||||
|
||||
@@ -95,25 +95,25 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
|
||||
EnumFacing newForward = facing;
|
||||
|
||||
if( !omniDirectional && getForward() == facing.getOpposite() )
|
||||
if( !this.omniDirectional && this.getForward() == facing.getOpposite() )
|
||||
{
|
||||
newForward = facing;
|
||||
}
|
||||
else if( !omniDirectional && ( getForward() == facing || getForward() == facing.getOpposite() ) )
|
||||
else if( !this.omniDirectional && ( this.getForward() == facing || this.getForward() == facing.getOpposite() ) )
|
||||
{
|
||||
omniDirectional = true;
|
||||
this.omniDirectional = true;
|
||||
}
|
||||
else if( omniDirectional )
|
||||
else if( this.omniDirectional )
|
||||
{
|
||||
newForward = facing.getOpposite();
|
||||
omniDirectional = false;
|
||||
this.omniDirectional = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
newForward = Platform.rotateAround( getForward(), facing );
|
||||
newForward = Platform.rotateAround( this.getForward(), facing );
|
||||
}
|
||||
|
||||
if( omniDirectional )
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
this.setOrientation( EnumFacing.NORTH, EnumFacing.UP );
|
||||
}
|
||||
@@ -134,13 +134,13 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
|
||||
private void configureNodeSides()
|
||||
{
|
||||
if( omniDirectional )
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.allOf( EnumFacing.class ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.complementOf( EnumSet.of( getForward() ) ) );
|
||||
this.getProxy().setValidSides( EnumSet.complementOf( EnumSet.of( this.getForward() ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_TileInterface( final NBTTagCompound data )
|
||||
{
|
||||
data.setBoolean( "omniDirectional", omniDirectional );
|
||||
data.setBoolean( "omniDirectional", this.omniDirectional );
|
||||
this.duality.writeToNBT( data );
|
||||
}
|
||||
|
||||
@@ -191,13 +191,13 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
{
|
||||
boolean oldOmniDirectional = this.omniDirectional;
|
||||
this.omniDirectional = data.readBoolean();
|
||||
return oldOmniDirectional != omniDirectional;
|
||||
return oldOmniDirectional != this.omniDirectional;
|
||||
}
|
||||
|
||||
@TileEvent( TileEventType.NETWORK_WRITE )
|
||||
public void writeToStream_TileInterface( final ByteBuf data )
|
||||
{
|
||||
data.writeBoolean( omniDirectional );
|
||||
data.writeBoolean( this.omniDirectional );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -263,11 +263,11 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
@Override
|
||||
public EnumSet<EnumFacing> getTargets()
|
||||
{
|
||||
if( omniDirectional )
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
return EnumSet.allOf( EnumFacing.class );
|
||||
}
|
||||
return EnumSet.of( getForward() );
|
||||
return EnumSet.of( this.getForward() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user