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
@@ -150,7 +150,7 @@ public class AppEngCraftingSlot extends AppEngSlot
@Override
public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack)
{
FMLCommonHandler.instance().firePlayerCraftingEvent( par1EntityPlayer, par2ItemStack, craftMatrix );
FMLCommonHandler.instance().firePlayerCraftingEvent( par1EntityPlayer, par2ItemStack, this.craftMatrix );
this.onCrafting( par2ItemStack );
for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i)
@@ -167,7 +167,7 @@ public class AppEngCraftingSlot extends AppEngSlot
if ( itemstack2 != null && itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage() )
{
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( thePlayer, itemstack2 ) );
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( this.thePlayer, itemstack2 ) );
continue;
}
@@ -39,13 +39,13 @@ public class AppEngSlot extends Slot
public Slot setNotDraggable()
{
isDraggable = false;
this.isDraggable = false;
return this;
}
public Slot setPlayerSide()
{
isPlayerSide = true;
this.isPlayerSide = true;
return this;
}
@@ -57,7 +57,7 @@ public class AppEngSlot extends Slot
@Override
public boolean func_111238_b()
{
return isEnabled();
return this.isEnabled();
}
public boolean isEnabled()
@@ -73,19 +73,19 @@ public class AppEngSlot extends Slot
@Override
public void onSlotChanged()
{
if ( inventory instanceof AppEngInternalInventory )
((AppEngInternalInventory) inventory).markDirty( getSlotIndex() );
if ( this.inventory instanceof AppEngInternalInventory )
((AppEngInternalInventory) this.inventory).markDirty( this.getSlotIndex() );
else
super.onSlotChanged();
isValid = hasCalculatedValidness.NotAvailable;
this.isValid = hasCalculatedValidness.NotAvailable;
}
public AppEngSlot(IInventory inv, int idx, int x, int y) {
super( inv, idx, x, y );
defX = x;
defY = y;
isValid = hasCalculatedValidness.NotAvailable;
this.defX = x;
this.defY = y;
this.isValid = hasCalculatedValidness.NotAvailable;
}
public boolean isDisplay = false;
@@ -93,16 +93,16 @@ public class AppEngSlot extends Slot
@Override
public ItemStack getStack()
{
if ( !isEnabled() )
if ( !this.isEnabled() )
return null;
if ( inventory.getSizeInventory() <= getSlotIndex() )
if ( this.inventory.getSizeInventory() <= this.getSlotIndex() )
return null;
if ( isDisplay )
if ( this.isDisplay )
{
isDisplay = false;
return getDisplayStack();
this.isDisplay = false;
return this.getDisplayStack();
}
return super.getStack();
}
@@ -110,12 +110,12 @@ public class AppEngSlot extends Slot
@Override
public void putStack(ItemStack par1ItemStack)
{
if ( isEnabled() )
if ( this.isEnabled() )
{
super.putStack( par1ItemStack );
if ( myContainer != null )
myContainer.onSlotChange( this );
if ( this.myContainer != null )
this.myContainer.onSlotChange( this );
}
}
@@ -127,7 +127,7 @@ public class AppEngSlot extends Slot
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
if ( isEnabled() )
if ( this.isEnabled() )
return super.canTakeStack( par1EntityPlayer );
return false;
}
@@ -135,7 +135,7 @@ public class AppEngSlot extends Slot
@Override
public boolean isItemValid(ItemStack par1ItemStack)
{
if ( isEnabled() )
if ( this.isEnabled() )
return super.isItemValid( par1ItemStack );
return false;
}
@@ -157,17 +157,17 @@ public class AppEngSlot extends Slot
public int getIcon()
{
return IIcon;
return this.IIcon;
}
public boolean isPlayerSide()
{
return isPlayerSide;
return this.isPlayerSide;
}
public boolean shouldDisplay()
{
return isEnabled();
return this.isEnabled();
}
}
@@ -35,20 +35,20 @@ public class OptionalSlotFake extends SlotFake
public OptionalSlotFake(IInventory inv, IOptionalSlotHost containerBus, int idx, int x, int y, int offX, int offY, int groupNum) {
super( inv, idx, x + offX * 18, y + offY * 18 );
srcX = x;
srcY = y;
invSlot = idx;
this.srcX = x;
this.srcY = y;
this.invSlot = idx;
this.groupNum = groupNum;
host = containerBus;
this.host = containerBus;
}
@Override
public ItemStack getStack()
{
if ( !isEnabled() )
if ( !this.isEnabled() )
{
if ( getDisplayStack() != null )
clearStack();
if ( this.getDisplayStack() != null )
this.clearStack();
}
return super.getStack();
@@ -57,15 +57,15 @@ public class OptionalSlotFake extends SlotFake
@Override
public boolean isEnabled()
{
if ( host == null )
if ( this.host == null )
return false;
return host.isSlotEnabled( groupNum );
return this.host.isSlotEnabled( this.groupNum );
}
public boolean renderDisabled()
{
return renderDisabled;
return this.renderDisabled;
}
}
@@ -29,16 +29,16 @@ public class OptionalSlotNormal extends AppEngSlot
public OptionalSlotNormal(IInventory inv, IOptionalSlotHost containerBus, int slot, int xPos, int yPos, int groupNum) {
super( inv, slot, xPos, yPos );
this.groupNum = groupNum;
host = containerBus;
this.host = containerBus;
}
@Override
public boolean isEnabled()
{
if ( host == null )
if ( this.host == null )
return false;
return host.isSlotEnabled( groupNum );
return this.host.isSlotEnabled( this.groupNum );
}
}
@@ -37,10 +37,10 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput
@Override
public boolean isEnabled()
{
if ( host == null )
if ( this.host == null )
return false;
return host.isSlotEnabled( groupNum );
return this.host.isSlotEnabled( this.groupNum );
}
}
@@ -42,14 +42,14 @@ public class SlotCraftingMatrix extends AppEngSlot
public void clearStack()
{
super.clearStack();
c.onCraftMatrixChanged( inventory );
this.c.onCraftMatrixChanged( this.inventory );
}
@Override
public ItemStack decrStackSize(int par1)
{
ItemStack is = super.decrStackSize( par1 );
c.onCraftMatrixChanged( inventory );
this.c.onCraftMatrixChanged( this.inventory );
return is;
}
@@ -57,7 +57,7 @@ public class SlotCraftingMatrix extends AppEngSlot
public void putStack(ItemStack par1ItemStack)
{
super.putStack( par1ItemStack );
c.onCraftMatrixChanged( inventory );
this.c.onCraftMatrixChanged( this.inventory );
}
}
@@ -64,14 +64,14 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
this.energySrc = energySrc;
this.storage = storage;
this.mySrc = mySrc;
pattern = cMatrix;
craftInv = secondMatrix;
container = ccp;
this.pattern = cMatrix;
this.craftInv = secondMatrix;
this.container = ccp;
}
public IInventory getCraftingMatrix()
{
return craftInv;
return this.craftInv;
}
@Override
@@ -92,18 +92,18 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
public ItemStack craftItem( EntityPlayer p, ItemStack request, IMEMonitor<IAEItemStack> inv, IItemList all )
{
// update crafting matrix...
ItemStack is = getStack();
ItemStack is = this.getStack();
if ( is != null && Platform.isSameItem( request, is ) )
{
ItemStack[] set = new ItemStack[pattern.getSizeInventory()];
ItemStack[] set = new ItemStack[this.pattern.getSizeInventory()];
// add one of each item to the items on the board...
if ( Platform.isServer() )
{
InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 );
for ( int x = 0; x < 9; x++ )
ic.setInventorySlotContents( x, pattern.getStackInSlot( x ) );
ic.setInventorySlotContents( x, this.pattern.getStackInSlot( x ) );
IRecipe r = Platform.findMatchingRecipe( ic, p.worldObj );
@@ -125,7 +125,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
{
super.onPickupFromSlot( p, is );
// actually necessary to cleanup this case...
p.openContainer.onCraftMatrixChanged( getCraftingMatrix() );
p.openContainer.onCraftMatrixChanged( this.getCraftingMatrix() );
return request;
}
}
@@ -136,27 +136,27 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
if ( inv != null )
{
for ( int x = 0; x < pattern.getSizeInventory(); x++ )
for ( int x = 0; x < this.pattern.getSizeInventory(); x++ )
{
if ( pattern.getStackInSlot( x ) != null )
if ( this.pattern.getStackInSlot( x ) != null )
{
set[x] = Platform.extractItemsByRecipe( energySrc, mySrc, inv, p.worldObj, r, is, ic, pattern.getStackInSlot( x ), x, all,
Actionable.MODULATE, ItemViewCell.createFilter( container.getViewCells() ) );
set[x] = Platform.extractItemsByRecipe( this.energySrc, this.mySrc, inv, p.worldObj, r, is, ic, this.pattern.getStackInSlot( x ), x, all,
Actionable.MODULATE, ItemViewCell.createFilter( this.container.getViewCells() ) );
ic.setInventorySlotContents( x, set[x] );
}
}
}
}
if ( preCraft( p, inv, set, is ) )
if ( this.preCraft( p, inv, set, is ) )
{
makeItem( p, is );
this.makeItem( p, is );
postCraft( p, inv, set, is );
this.postCraft( p, inv, set, is );
}
// shouldn't be necessary...
p.openContainer.onCraftMatrixChanged( getCraftingMatrix() );
p.openContainer.onCraftMatrixChanged( this.getCraftingMatrix() );
return is;
}
@@ -177,14 +177,14 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
if ( Platform.isServer() )
{
// set new items onto the crafting table...
for ( int x = 0; x < getCraftingMatrix().getSizeInventory(); x++ )
for ( int x = 0; x < this.getCraftingMatrix().getSizeInventory(); x++ )
{
if ( getCraftingMatrix().getStackInSlot( x ) == null )
getCraftingMatrix().setInventorySlotContents( x, set[x] );
if ( this.getCraftingMatrix().getStackInSlot( x ) == null )
this.getCraftingMatrix().setInventorySlotContents( x, set[x] );
else if ( set[x] != null )
{
// eek! put it back!
IAEItemStack fail = inv.injectItems( AEItemStack.create( set[x] ), Actionable.MODULATE, mySrc );
IAEItemStack fail = inv.injectItems( AEItemStack.create( set[x] ), Actionable.MODULATE, this.mySrc );
if ( fail != null )
drops.add( fail.getItemStack() );
}
@@ -197,25 +197,25 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
public void doClick( InventoryAction action, EntityPlayer who )
{
if ( getStack() == null )
if ( this.getStack() == null )
return;
if ( Platform.isClient() )
return;
IMEMonitor<IAEItemStack> inv = storage.getItemInventory();
int howManyPerCraft = getStack().stackSize;
IMEMonitor<IAEItemStack> inv = this.storage.getItemInventory();
int howManyPerCraft = this.getStack().stackSize;
int maxTimesToCraft = 0;
InventoryAdaptor ia = null;
if ( action == InventoryAction.CRAFT_SHIFT ) // craft into player inventory...
{
ia = InventoryAdaptor.getAdaptor( who, null );
maxTimesToCraft = ( int ) Math.floor( ( double ) getStack().getMaxStackSize() / ( double ) howManyPerCraft );
maxTimesToCraft = ( int ) Math.floor( ( double ) this.getStack().getMaxStackSize() / ( double ) howManyPerCraft );
}
else if ( action == InventoryAction.CRAFT_STACK ) // craft into hand, full stack
{
ia = new AdaptorPlayerHand( who );
maxTimesToCraft = ( int ) Math.floor( ( double ) getStack().getMaxStackSize() / ( double ) howManyPerCraft );
maxTimesToCraft = ( int ) Math.floor( ( double ) this.getStack().getMaxStackSize() / ( double ) howManyPerCraft );
}
else
// pick up what was crafted...
@@ -224,12 +224,12 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
maxTimesToCraft = 1;
}
maxTimesToCraft = CapCraftingAttempts( maxTimesToCraft );
maxTimesToCraft = this.CapCraftingAttempts( maxTimesToCraft );
if ( ia == null )
return;
ItemStack rs = Platform.cloneItemStack( getStack() );
ItemStack rs = Platform.cloneItemStack( this.getStack() );
if ( rs == null )
return;
@@ -238,7 +238,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
if ( ia.simulateAdd( rs ) == null )
{
IItemList<IAEItemStack> all = inv.getStorageList();
ItemStack extra = ia.addItems( craftItem( who, rs, inv, all ) );
ItemStack extra = ia.addItems( this.craftItem( who, rs, inv, all ) );
if ( extra != null )
{
List<ItemStack> drops = new ArrayList<ItemStack>();
@@ -29,7 +29,7 @@ public class SlotFake extends AppEngSlot
public SlotFake(IInventory inv, int idx, int x, int y) {
super( inv, idx, x, y );
invSlot = idx;
this.invSlot = idx;
}
@Override
@@ -42,9 +42,9 @@ public class SlotFakeBlacklist extends SlotFakeTypeOnly
@Override
public int getIcon()
{
if ( getHasStack() )
if ( this.getHasStack() )
{
return getStack().stackSize > 0 ? 16 + 14 : 14;
return this.getStack().stackSize > 0 ? 16 + 14 : 14;
}
return -1;
}
@@ -34,20 +34,20 @@ public class SlotInaccessible extends AppEngSlot
@Override
public ItemStack getDisplayStack()
{
if ( dspStack == null )
if ( this.dspStack == null )
{
ItemStack dsp = super.getDisplayStack();
if ( dsp != null )
dspStack = dsp.copy();
this.dspStack = dsp.copy();
}
return dspStack;
return this.dspStack;
}
@Override
public void onSlotChanged()
{
super.onSlotChanged();
dspStack = null;
this.dspStack = null;
}
@Override
@@ -35,7 +35,7 @@ public class SlotMACPattern extends AppEngSlot
@Override
public boolean isItemValid(ItemStack i)
{
return mac.isValidItemForSlot( this.getSlotIndex(), i );
return this.mac.isValidItemForSlot( this.getSlotIndex(), i );
}
}
@@ -26,7 +26,7 @@ public class SlotOutput extends AppEngSlot
public SlotOutput(IInventory a, int b, int c, int d, int i) {
super( a, b, c, d );
IIcon = i;
this.IIcon = i;
}
@Override
@@ -42,18 +42,18 @@ public class SlotPatternTerm extends SlotCraftingTerm
{
super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c );
host = h;
groupNum = groupNumber;
this.host = h;
this.groupNum = groupNumber;
}
@Override
public ItemStack getStack()
{
if ( !isEnabled() )
if ( !this.isEnabled() )
{
if ( getDisplayStack() != null )
clearStack();
if ( this.getDisplayStack() != null )
this.clearStack();
}
return super.getStack();
@@ -62,15 +62,15 @@ public class SlotPatternTerm extends SlotCraftingTerm
@Override
public boolean isEnabled()
{
if ( host == null )
if ( this.host == null )
return false;
return host.isSlotEnabled( groupNum );
return this.host.isSlotEnabled( this.groupNum );
}
public AppEngPacket getRequest(boolean shift) throws IOException
{
return new PacketPatternSlot( this.pattern, AEApi.instance().storage().createItemStack( getStack() ), shift );
return new PacketPatternSlot( this.pattern, AEApi.instance().storage().createItemStack( this.getStack() ), shift );
}
}
@@ -25,6 +25,6 @@ public class SlotPlayerHotBar extends AppEngSlot
public SlotPlayerHotBar(IInventory par1iInventory, int par2, int par3, int par4) {
super( par1iInventory, par2, par3, par4 );
isPlayerSide = true;
this.isPlayerSide = true;
}
}
@@ -28,6 +28,6 @@ public class SlotPlayerInv extends AppEngSlot
public SlotPlayerInv(IInventory par1iInventory, int par2, int par3, int par4) {
super( par1iInventory, par2, par3, par4 );
isPlayerSide = true;
this.isPlayerSide = true;
}
}
@@ -61,21 +61,21 @@ public class SlotRestrictedInput extends AppEngSlot
public final int IIcon;
private PlacableItemType(int o) {
IIcon = o;
this.IIcon = o;
}
}
@Override
public int getSlotStackLimit()
{
if ( stackLimit != -1 )
return stackLimit;
if ( this.stackLimit != -1 )
return this.stackLimit;
return super.getSlotStackLimit();
}
public boolean isValid(ItemStack is, World theWorld)
{
if ( which == PlacableItemType.VALID_ENCODED_PATTERN_W_OUTPUT )
if ( this.which == PlacableItemType.VALID_ENCODED_PATTERN_W_OUTPUT )
{
ICraftingPatternDetails ap = is.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem) is.getItem()).getPatternForItem( is, theWorld )
: null;
@@ -94,26 +94,26 @@ public class SlotRestrictedInput extends AppEngSlot
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
return allowEdit;
return this.allowEdit;
}
public Slot setStackLimit(int i)
{
stackLimit = i;
this.stackLimit = i;
return this;
}
public SlotRestrictedInput(PlacableItemType valid, IInventory i, int slotIndex, int x, int y, InventoryPlayer p) {
super( i, slotIndex, x, y );
which = valid;
IIcon = valid.IIcon;
this.which = valid;
this.IIcon = valid.IIcon;
this.p = p;
}
@Override
public ItemStack getDisplayStack()
{
if ( Platform.isClient() && (which == PlacableItemType.ENCODED_PATTERN) )
if ( Platform.isClient() && (this.which == PlacableItemType.ENCODED_PATTERN) )
{
ItemStack is = super.getStack();
if ( is != null && is.getItem() instanceof ItemEncodedPattern )
@@ -130,7 +130,7 @@ public class SlotRestrictedInput extends AppEngSlot
@Override
public boolean isItemValid(ItemStack i)
{
if ( !myContainer.isValidForSlot( this, i ) )
if ( !this.myContainer.isValidForSlot( this, i ) )
return false;
if ( i == null )
@@ -138,21 +138,21 @@ public class SlotRestrictedInput extends AppEngSlot
if ( i.getItem() == null )
return false;
if ( !inventory.isItemValidForSlot( this.getSlotIndex(), i ) )
if ( !this.inventory.isItemValidForSlot( this.getSlotIndex(), i ) )
return false;
IAppEngApi api = AEApi.instance();
if ( !allowEdit )
if ( !this.allowEdit )
return false;
switch (which)
switch (this.which)
{
case ENCODED_CRAFTING_PATTERN:
if ( i.getItem() instanceof ICraftingPatternItem )
{
ICraftingPatternItem b = (ICraftingPatternItem) i.getItem();
ICraftingPatternDetails de = b.getPatternForItem( i, p.player.worldObj );
ICraftingPatternDetails de = b.getPatternForItem( i, this.p.player.worldObj );
if ( de != null )
return de.isCraftable();
}