Use qualified method and field access
This commit is contained in:
@@ -110,7 +110,7 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
@Override
|
||||
public ItemStack getStack()
|
||||
{
|
||||
final IItemHandler baseInv = getItemHandler();
|
||||
final IItemHandler baseInv = this.getItemHandler();
|
||||
final ItemStack input = baseInv.getStackInSlot( 0 );
|
||||
if( input == ItemStack.EMPTY )
|
||||
{
|
||||
@@ -137,10 +137,10 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
@Nonnull
|
||||
public ItemStack decrStackSize( int amount )
|
||||
{
|
||||
ItemStack ret = getStack();
|
||||
ItemStack ret = this.getStack();
|
||||
if( !ret.isEmpty() )
|
||||
{
|
||||
makePlate();
|
||||
this.makePlate();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -150,21 +150,21 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
{
|
||||
if( stack.isEmpty() )
|
||||
{
|
||||
makePlate();
|
||||
this.makePlate();
|
||||
}
|
||||
}
|
||||
|
||||
private void makePlate()
|
||||
{
|
||||
if( !getItemHandler().extractItem( 0, 1, false ).isEmpty() )
|
||||
if( !this.getItemHandler().extractItem( 0, 1, false ).isEmpty() )
|
||||
{
|
||||
final ItemStack item = ContainerQuartzKnife.this.toolInv.getItemStack();
|
||||
item.damageItem( 1, getPlayerInv().player );
|
||||
item.damageItem( 1, ContainerQuartzKnife.this.getPlayerInv().player );
|
||||
|
||||
if( item.getCount() == 0 )
|
||||
{
|
||||
getPlayerInv().mainInventory.add( getPlayerInv().currentItem, ItemStack.EMPTY );
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( getPlayerInv().player, item, null ) );
|
||||
ContainerQuartzKnife.this.getPlayerInv().mainInventory.add( ContainerQuartzKnife.this.getPlayerInv().currentItem, ItemStack.EMPTY );
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( ContainerQuartzKnife.this.getPlayerInv().player, item, null ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class AppEngSlot extends Slot
|
||||
return this.getDisplayStack();
|
||||
}
|
||||
|
||||
return this.itemHandler.getStackInSlot( index );
|
||||
return this.itemHandler.getStackInSlot( this.index );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,7 +120,7 @@ public class AppEngSlot extends Slot
|
||||
{
|
||||
if( this.isSlotEnabled() )
|
||||
{
|
||||
ItemHandlerUtil.setStackInSlot( this.itemHandler, index, stack );
|
||||
ItemHandlerUtil.setStackInSlot( this.itemHandler, this.index, stack );
|
||||
this.onSlotChanged();
|
||||
|
||||
if( this.getContainer() != null )
|
||||
@@ -151,7 +151,7 @@ public class AppEngSlot extends Slot
|
||||
@Override
|
||||
public int getItemStackLimit( @Nonnull ItemStack stack )
|
||||
{
|
||||
return Math.min( getSlotStackLimit(), stack.getMaxStackSize() );
|
||||
return Math.min( this.getSlotStackLimit(), stack.getMaxStackSize() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +159,7 @@ public class AppEngSlot extends Slot
|
||||
{
|
||||
if( this.isSlotEnabled() )
|
||||
{
|
||||
return !this.itemHandler.extractItem( index, 1, true ).isEmpty();
|
||||
return !this.itemHandler.extractItem( this.index, 1, true ).isEmpty();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public class AppEngSlot extends Slot
|
||||
@Nonnull
|
||||
public ItemStack decrStackSize( int amount )
|
||||
{
|
||||
return this.itemHandler.extractItem( index, amount, false );
|
||||
return this.itemHandler.extractItem( this.index, amount, false );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,7 +191,7 @@ public class AppEngSlot extends Slot
|
||||
|
||||
public ItemStack getDisplayStack()
|
||||
{
|
||||
return this.itemHandler.getStackInSlot( index );
|
||||
return this.itemHandler.getStackInSlot( this.index );
|
||||
}
|
||||
|
||||
public float getOpacityOfIcon()
|
||||
|
||||
Reference in New Issue
Block a user