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
@@ -52,33 +52,33 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
@TileEvent(TileEventType.TICK)
public void Tick_TileCrank()
{
if ( rotation > 0 )
if ( this.rotation > 0 )
{
visibleRotation -= 360 / (ticksPerRotation);
charge++;
if ( charge >= ticksPerRotation )
this.visibleRotation -= 360 / (this.ticksPerRotation);
this.charge++;
if ( this.charge >= this.ticksPerRotation )
{
charge -= ticksPerRotation;
ICrankable g = getGrinder();
this.charge -= this.ticksPerRotation;
ICrankable g = this.getGrinder();
if ( g != null )
g.applyTurn();
}
rotation--;
this.rotation--;
}
}
@TileEvent(TileEventType.NETWORK_READ)
public boolean readFromStream_TileCrank(ByteBuf data)
{
rotation = data.readInt();
this.rotation = data.readInt();
return false;
}
@TileEvent(TileEventType.NETWORK_WRITE)
public void writeToStream_TileCrank(ByteBuf data)
{
data.writeInt( rotation );
data.writeInt( this.rotation );
}
public ICrankable getGrinder()
@@ -86,8 +86,8 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
if ( Platform.isClient() )
return null;
ForgeDirection grinder = getUp().getOpposite();
TileEntity te = worldObj.getTileEntity( xCoord + grinder.offsetX, yCoord + grinder.offsetY, zCoord + grinder.offsetZ );
ForgeDirection grinder = this.getUp().getOpposite();
TileEntity te = this.worldObj.getTileEntity( this.xCoord + grinder.offsetX, this.yCoord + grinder.offsetY, this.zCoord + grinder.offsetZ );
if ( te instanceof ICrankable )
return (ICrankable) te;
return null;
@@ -97,7 +97,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
public void setOrientation(ForgeDirection inForward, ForgeDirection inUp)
{
super.setOrientation( inForward, inUp );
getBlockType().onNeighborBlockChange( worldObj, xCoord, yCoord, zCoord, Platform.air );
this.getBlockType().onNeighborBlockChange( this.worldObj, this.xCoord, this.yCoord, this.zCoord, Platform.air );
}
/**
@@ -108,24 +108,24 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
if ( Platform.isClient() )
return false;
if ( rotation < 3 )
if ( this.rotation < 3 )
{
ICrankable g = getGrinder();
ICrankable g = this.getGrinder();
if ( g != null )
{
if ( g.canTurn() )
{
hits = 0;
rotation += ticksPerRotation;
this.hits = 0;
this.rotation += this.ticksPerRotation;
this.markForUpdate();
return true;
}
else
{
hits++;
if ( hits > 10 )
this.hits++;
if ( this.hits > 10 )
{
worldObj.func_147480_a( xCoord, yCoord, zCoord, false );
this.worldObj.func_147480_a( this.xCoord, this.yCoord, this.zCoord, false );
// worldObj.destroyBlock( xCoord, yCoord, zCoord, false );
}
}
@@ -138,18 +138,18 @@ public class TileCrank extends AEBaseTile implements ICustomCollision
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{
double xOff = -0.15 * getUp().offsetX;
double yOff = -0.15 * getUp().offsetY;
double zOff = -0.15 * getUp().offsetZ;
double xOff = -0.15 * this.getUp().offsetX;
double yOff = -0.15 * this.getUp().offsetY;
double zOff = -0.15 * this.getUp().offsetZ;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( xOff + 0.15, yOff + 0.15, zOff + 0.15, xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
}
@Override
public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e)
{
double xOff = -0.15 * getUp().offsetX;
double yOff = -0.15 * getUp().offsetY;
double zOff = -0.15 * getUp().offsetZ;
double xOff = -0.15 * this.getUp().offsetX;
double yOff = -0.15 * this.getUp().offsetY;
double zOff = -0.15 * this.getUp().offsetZ;
out.add( AxisAlignedBB.getBoundingBox( xOff + 0.15, yOff + 0.15, zOff + 0.15,// ahh
xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
}
@@ -48,7 +48,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
public void setOrientation(ForgeDirection inForward, ForgeDirection inUp)
{
super.setOrientation( inForward, inUp );
getBlockType().onNeighborBlockChange( worldObj, xCoord, yCoord, zCoord, Platform.air );
this.getBlockType().onNeighborBlockChange( this.worldObj, this.xCoord, this.yCoord, this.zCoord, Platform.air );
}
private void addItem(InventoryAdaptor sia, ItemStack output)
@@ -59,14 +59,14 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
ItemStack notAdded = sia.addItems( output );
if ( notAdded != null )
{
WorldCoord wc = new WorldCoord( xCoord, yCoord, zCoord );
WorldCoord wc = new WorldCoord( this.xCoord, this.yCoord, this.zCoord );
wc.add( getForward(), 1 );
wc.add( this.getForward(), 1 );
List<ItemStack> out = new ArrayList<ItemStack>();
out.add( notAdded );
Platform.spawnDrops( worldObj, wc.x, wc.y, wc.z, out );
Platform.spawnDrops( this.worldObj, wc.x, wc.y, wc.z, out );
}
}
@@ -88,13 +88,13 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
@Override
public IInventory getInternalInventory()
{
return inv;
return this.inv;
}
@Override
public int[] getAccessibleSlotsBySide(ForgeDirection side)
{
return sides;
return this.sides;
}
@Override
@@ -111,7 +111,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
if ( null == this.getStackInSlot( 6 ) ) // Add if there isn't one...
{
IInventory src = new WrapperInventoryRange( this, inputs, true );
IInventory src = new WrapperInventoryRange( this, this.inputs, true );
for (int x = 0; x < src.getSizeInventory(); x++)
{
ItemStack item = src.getStackInSlot( x );
@@ -147,27 +147,27 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
if ( Platform.isClient() )
return;
points++;
this.points++;
ItemStack processing = this.getStackInSlot( 6 );
IGrinderEntry r = AEApi.instance().registries().grinder().getRecipeForInput( processing );
if ( r != null )
{
if ( r.getEnergyCost() > points )
if ( r.getEnergyCost() > this.points )
return;
points = 0;
this.points = 0;
InventoryAdaptor sia = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( this, 3, 3, true ), ForgeDirection.EAST );
addItem( sia, r.getOutput() );
this.addItem( sia, r.getOutput() );
float chance = (Platform.getRandomInt() % 2000) / 2000.0f;
if ( chance <= r.getOptionalChance() )
addItem( sia, r.getOptionalOutput() );
this.addItem( sia, r.getOptionalOutput() );
chance = (Platform.getRandomInt() % 2000) / 2000.0f;
if ( chance <= r.getSecondOptionalChance() )
addItem( sia, r.getSecondOptionalOutput() );
this.addItem( sia, r.getSecondOptionalOutput() );
this.setInventorySlotContents( 6, null );
}
@@ -176,7 +176,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
@Override
public boolean canCrankAttach(ForgeDirection directionToCrank)
{
return getUp().equals( directionToCrank );
return this.getUp().equals( directionToCrank );
}
}