Changed access to use this qualifier
This commit is contained in:
@@ -38,18 +38,18 @@ public class AdaptorBCPipe extends InventoryAdaptor
|
||||
final private ForgeDirection d;
|
||||
|
||||
public AdaptorBCPipe(TileEntity s, ForgeDirection dd) {
|
||||
bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
if ( bc != null )
|
||||
this.bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
if ( this.bc != null )
|
||||
{
|
||||
if ( bc.isPipe( s, dd ) )
|
||||
if ( this.bc.isPipe( s, dd ) )
|
||||
{
|
||||
i = s;
|
||||
d = dd;
|
||||
this.i = s;
|
||||
this.d = dd;
|
||||
return;
|
||||
}
|
||||
}
|
||||
i = null;
|
||||
d = null;
|
||||
this.i = null;
|
||||
this.d = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,14 +79,14 @@ public class AdaptorBCPipe extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack addItems(ItemStack A)
|
||||
{
|
||||
if ( i == null )
|
||||
if ( this.i == null )
|
||||
return A;
|
||||
if ( A == null )
|
||||
return null;
|
||||
if ( A.stackSize == 0 )
|
||||
return null;
|
||||
|
||||
if ( bc.addItemsToPipe( i, A, d ) )
|
||||
if ( this.bc.addItemsToPipe( this.i, A, this.d ) )
|
||||
return null;
|
||||
return A;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class AdaptorBCPipe extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack A)
|
||||
{
|
||||
if ( i == null )
|
||||
if ( this.i == null )
|
||||
return A;
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -36,24 +36,24 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
|
||||
public AdaptorIInventory( IInventory s )
|
||||
{
|
||||
i = s;
|
||||
wrapperEnabled = s instanceof IInventoryWrapper;
|
||||
this.i = s;
|
||||
this.wrapperEnabled = s instanceof IInventoryWrapper;
|
||||
}
|
||||
|
||||
boolean canRemoveStackFromSlot( int x, ItemStack is )
|
||||
{
|
||||
if ( wrapperEnabled )
|
||||
return ( ( IInventoryWrapper ) i ).canRemoveItemFromSlot( x, is );
|
||||
if ( this.wrapperEnabled )
|
||||
return ( ( IInventoryWrapper ) this.i ).canRemoveItemFromSlot( x, is );
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
for ( int x = 0; x < s; x++ )
|
||||
{
|
||||
if ( i.getStackInSlot( x ) != null )
|
||||
if ( this.i.getStackInSlot( x ) != null )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -62,11 +62,11 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
for ( int x = 0; x < s; x++ )
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode ) ) )
|
||||
ItemStack is = this.i.getStackInSlot( x );
|
||||
if ( is != null && this.canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode ) ) )
|
||||
{
|
||||
int newAmount = amount;
|
||||
if ( newAmount > is.stackSize )
|
||||
@@ -82,15 +82,15 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
|
||||
if ( is.stackSize == rv.stackSize )
|
||||
{
|
||||
i.setInventorySlotContents( x, null );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( x, null );
|
||||
this.i.markDirty();
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack po = is.copy();
|
||||
po.stackSize -= rv.stackSize;
|
||||
i.setInventorySlotContents( x, po );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( x, po );
|
||||
this.i.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,12 +107,12 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
for ( int x = 0; x < s; x++ )
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
ItemStack is = this.i.getStackInSlot( x );
|
||||
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode ) ) )
|
||||
if ( is != null && this.canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode ) ) )
|
||||
{
|
||||
int boundAmount = amount;
|
||||
if ( boundAmount > is.stackSize )
|
||||
@@ -134,13 +134,13 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack removeItems( int amount, ItemStack filter, IInventoryDestination destination )
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
ItemStack rv = null;
|
||||
|
||||
for ( int x = 0; x < s && amount > 0; x++ )
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemPrecise( is, filter ) ) )
|
||||
ItemStack is = this.i.getStackInSlot( x );
|
||||
if ( is != null && this.canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemPrecise( is, filter ) ) )
|
||||
{
|
||||
int boundAmounts = amount;
|
||||
if ( boundAmounts > is.stackSize )
|
||||
@@ -165,15 +165,15 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
|
||||
if ( is.stackSize == boundAmounts )
|
||||
{
|
||||
i.setInventorySlotContents( x, null );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( x, null );
|
||||
this.i.markDirty();
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack po = is.copy();
|
||||
po.stackSize -= boundAmounts;
|
||||
i.setInventorySlotContents( x, po );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( x, po );
|
||||
this.i.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,13 +188,13 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateRemove( int amount, ItemStack filter, IInventoryDestination destination )
|
||||
{
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
ItemStack rv = null;
|
||||
|
||||
for ( int x = 0; x < s && amount > 0; x++ )
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( x );
|
||||
if ( is != null && canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemPrecise( is, filter ) ) )
|
||||
ItemStack is = this.i.getStackInSlot( x );
|
||||
if ( is != null && this.canRemoveStackFromSlot( x, is ) && ( filter == null || Platform.isSameItemPrecise( is, filter ) ) )
|
||||
{
|
||||
int boundAmount = amount;
|
||||
if ( boundAmount > is.stackSize )
|
||||
@@ -225,13 +225,13 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack addItems( ItemStack itemsToAdd )
|
||||
{
|
||||
return addItems( itemsToAdd, true );
|
||||
return this.addItems( itemsToAdd, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd( ItemStack itemsToAdd )
|
||||
{
|
||||
return addItems( itemsToAdd, false );
|
||||
return this.addItems( itemsToAdd, false );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,25 +254,25 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
|
||||
ItemStack left = itemsToAdd.copy();
|
||||
int stackLimit = itemsToAdd.getMaxStackSize();
|
||||
int perOperationLimit = Math.min( i.getInventoryStackLimit(), stackLimit );
|
||||
int inventorySize = i.getSizeInventory();
|
||||
int perOperationLimit = Math.min( this.i.getInventoryStackLimit(), stackLimit );
|
||||
int inventorySize = this.i.getSizeInventory();
|
||||
|
||||
for ( int slot = 0; slot < inventorySize; slot++ )
|
||||
{
|
||||
ItemStack next = left.copy();
|
||||
next.stackSize = Math.min( perOperationLimit, next.stackSize );
|
||||
|
||||
if ( i.isItemValidForSlot( slot, next ) )
|
||||
if ( this.i.isItemValidForSlot( slot, next ) )
|
||||
{
|
||||
ItemStack is = i.getStackInSlot( slot );
|
||||
ItemStack is = this.i.getStackInSlot( slot );
|
||||
if ( is == null )
|
||||
{
|
||||
left.stackSize -= next.stackSize;
|
||||
|
||||
if ( modulate )
|
||||
{
|
||||
i.setInventorySlotContents( slot, next );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( slot, next );
|
||||
this.i.markDirty();
|
||||
}
|
||||
|
||||
if ( left.stackSize <= 0 )
|
||||
@@ -288,8 +288,8 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
if ( modulate )
|
||||
{
|
||||
is.stackSize += used;
|
||||
i.setInventorySlotContents( slot, is );
|
||||
i.markDirty();
|
||||
this.i.setInventorySlotContents( slot, is );
|
||||
this.i.markDirty();
|
||||
}
|
||||
|
||||
left.stackSize -= used;
|
||||
@@ -313,19 +313,19 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean hasNext()
|
||||
{
|
||||
return x < i.getSizeInventory();
|
||||
return this.x < AdaptorIInventory.this.i.getSizeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSlot next()
|
||||
{
|
||||
ItemStack iss = i.getStackInSlot( x );
|
||||
ItemStack iss = AdaptorIInventory.this.i.getStackInSlot( this.x );
|
||||
|
||||
is.isExtractable = canRemoveStackFromSlot( x, iss );
|
||||
is.setItemStack( iss );
|
||||
this.is.isExtractable = AdaptorIInventory.this.canRemoveStackFromSlot( this.x, iss );
|
||||
this.is.setItemStack( iss );
|
||||
|
||||
is.slot = x++;
|
||||
return is;
|
||||
this.is.slot = this.x++;
|
||||
return this.is;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,37 +36,37 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
private final ForgeDirection d;
|
||||
|
||||
public AdaptorISpecialInventory(ISpecialInventory s, ForgeDirection dd) {
|
||||
i = s;
|
||||
d = dd;
|
||||
this.i = s;
|
||||
this.d = dd;
|
||||
|
||||
if ( s instanceof ISidedInventory )
|
||||
remover = new AdaptorIInventory( new WrapperMCISidedInventory( (ISidedInventory) s, d ) );
|
||||
this.remover = new AdaptorIInventory( new WrapperMCISidedInventory( (ISidedInventory) s, this.d ) );
|
||||
else
|
||||
remover = new AdaptorIInventory( s );
|
||||
this.remover = new AdaptorIInventory( s );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
return remover.removeSimilarItems( how_many, filter, fuzzyMode, destination );
|
||||
return this.remover.removeSimilarItems( how_many, filter, fuzzyMode, destination );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
return remover.simulateSimilarRemove( how_many, filter, fuzzyMode, destination );
|
||||
return this.remover.simulateSimilarRemove( how_many, filter, fuzzyMode, destination );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeItems(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
return remover.removeItems( how_many, filter, destination );
|
||||
return this.remover.removeItems( how_many, filter, destination );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateRemove(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
return remover.simulateRemove( how_many, filter, destination );
|
||||
return this.remover.simulateRemove( how_many, filter, destination );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,7 +77,7 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
if ( A.stackSize == 0 )
|
||||
return null;
|
||||
|
||||
int used = i.addItem( A, true, d );
|
||||
int used = this.i.addItem( A, true, this.d );
|
||||
ItemStack out = A.copy();
|
||||
out.stackSize -= used;
|
||||
if ( out.stackSize > 0 )
|
||||
@@ -88,7 +88,7 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack A)
|
||||
{
|
||||
int used = i.addItem( A, false, d );
|
||||
int used = this.i.addItem( A, false, this.d );
|
||||
ItemStack out = A.copy();
|
||||
out.stackSize -= used;
|
||||
if ( out.stackSize > 0 )
|
||||
@@ -99,17 +99,17 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
if ( i instanceof ISidedInventory )
|
||||
if ( this.i instanceof ISidedInventory )
|
||||
{
|
||||
ISidedInventory sided = (ISidedInventory) i;
|
||||
int slots[] = sided.getAccessibleSlotsFromSide( d.ordinal() );
|
||||
ISidedInventory sided = (ISidedInventory) this.i;
|
||||
int slots[] = sided.getAccessibleSlotsFromSide( this.d.ordinal() );
|
||||
|
||||
if ( slots == null )
|
||||
return false;
|
||||
|
||||
for (int slot : slots)
|
||||
{
|
||||
if ( i.getStackInSlot( slot ) != null )
|
||||
if ( this.i.getStackInSlot( slot ) != null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -118,9 +118,9 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
return false;
|
||||
}
|
||||
|
||||
int s = i.getSizeInventory();
|
||||
int s = this.i.getSizeInventory();
|
||||
for (int x = 0; x < s; x++)
|
||||
if ( i.getStackInSlot( x ) != null )
|
||||
if ( this.i.getStackInSlot( x ) != null )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
||||
@Override
|
||||
public Iterator<ItemSlot> iterator()
|
||||
{
|
||||
return remover.iterator();
|
||||
return this.remover.iterator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,16 +33,16 @@ public class AdaptorList extends InventoryAdaptor
|
||||
private final List<ItemStack> i;
|
||||
|
||||
public AdaptorList(List<ItemStack> s) {
|
||||
i = s;
|
||||
this.i = s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.size();
|
||||
int s = this.i.size();
|
||||
for (int x = 0; x < s; x++)
|
||||
{
|
||||
ItemStack is = i.get( x );
|
||||
ItemStack is = this.i.get( x );
|
||||
if ( is != null && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) )
|
||||
{
|
||||
if ( how_many > is.stackSize )
|
||||
@@ -58,7 +58,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
|
||||
// remove it..
|
||||
if ( is.stackSize <= 0 )
|
||||
i.remove( x );
|
||||
this.i.remove( x );
|
||||
|
||||
return rv;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
for (ItemStack is : i)
|
||||
for (ItemStack is : this.i)
|
||||
{
|
||||
if ( is != null && (filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode )) )
|
||||
{
|
||||
@@ -98,10 +98,10 @@ public class AdaptorList extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack removeItems(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
int s = i.size();
|
||||
int s = this.i.size();
|
||||
for (int x = 0; x < s; x++)
|
||||
{
|
||||
ItemStack is = i.get( x );
|
||||
ItemStack is = this.i.get( x );
|
||||
if ( is != null && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
||||
{
|
||||
if ( how_many > is.stackSize )
|
||||
@@ -117,7 +117,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
|
||||
// remove it..
|
||||
if ( is.stackSize <= 0 )
|
||||
i.remove( x );
|
||||
this.i.remove( x );
|
||||
|
||||
return rv;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack simulateRemove(int how_many, ItemStack filter, IInventoryDestination destination)
|
||||
{
|
||||
for (ItemStack is : i)
|
||||
for (ItemStack is : this.i)
|
||||
{
|
||||
if ( is != null && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
||||
{
|
||||
@@ -164,7 +164,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
|
||||
ItemStack left = A.copy();
|
||||
|
||||
for (ItemStack is : i)
|
||||
for (ItemStack is : this.i)
|
||||
{
|
||||
if ( Platform.isSameItem( is, left ) )
|
||||
{
|
||||
@@ -173,7 +173,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
}
|
||||
}
|
||||
|
||||
i.add( left );
|
||||
this.i.add( left );
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
for (ItemStack is : i)
|
||||
for (ItemStack is : this.i)
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public class AdaptorList extends InventoryAdaptor
|
||||
@Override
|
||||
public Iterator<ItemSlot> iterator()
|
||||
{
|
||||
return new StackToSlotIterator( i.iterator() );
|
||||
return new StackToSlotIterator( this.i.iterator() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
|
||||
public AdaptorPlayerHand( EntityPlayer _p )
|
||||
{
|
||||
p = _p;
|
||||
this.p = _p;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems( int how_many, ItemStack Filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
|
||||
{
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
if ( hand == null )
|
||||
return null;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
result.stackSize = hand.stackSize > how_many ? how_many : hand.stackSize;
|
||||
hand.stackSize -= how_many;
|
||||
if ( hand.stackSize <= 0 )
|
||||
p.inventory.setItemStack( null );
|
||||
this.p.inventory.setItemStack( null );
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
public ItemStack simulateSimilarRemove( int how_many, ItemStack Filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
|
||||
{
|
||||
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
if ( hand == null )
|
||||
return null;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack removeItems( int how_many, ItemStack Filter, IInventoryDestination destination )
|
||||
{
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
if ( hand == null )
|
||||
return null;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
result.stackSize = hand.stackSize > how_many ? how_many : hand.stackSize;
|
||||
hand.stackSize -= how_many;
|
||||
if ( hand.stackSize <= 0 )
|
||||
p.inventory.setItemStack( null );
|
||||
this.p.inventory.setItemStack( null );
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
public ItemStack simulateRemove( int how_many, ItemStack Filter, IInventoryDestination destination )
|
||||
{
|
||||
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
if ( hand == null )
|
||||
return null;
|
||||
|
||||
@@ -127,12 +127,12 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
return null;
|
||||
if ( A.stackSize == 0 )
|
||||
return null;
|
||||
if ( p == null )
|
||||
if ( this.p == null )
|
||||
return A;
|
||||
if ( p.inventory == null )
|
||||
if ( this.p.inventory == null )
|
||||
return A;
|
||||
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
|
||||
if ( hand != null && !Platform.isSameItemPrecise( A, hand ) )
|
||||
return A;
|
||||
@@ -153,18 +153,18 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
newHand.stackSize = newHand.getMaxStackSize();
|
||||
ItemStack B = A.copy();
|
||||
B.stackSize -= newHand.stackSize - original;
|
||||
p.inventory.setItemStack( newHand );
|
||||
this.p.inventory.setItemStack( newHand );
|
||||
return B;
|
||||
}
|
||||
|
||||
p.inventory.setItemStack( newHand );
|
||||
this.p.inventory.setItemStack( newHand );
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd( ItemStack A )
|
||||
{
|
||||
ItemStack hand = p.inventory.getItemStack();
|
||||
ItemStack hand = this.p.inventory.getItemStack();
|
||||
if ( A == null )
|
||||
return null;
|
||||
|
||||
@@ -196,7 +196,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
return p.inventory.getItemStack() != null;
|
||||
return this.p.inventory.getItemStack() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,19 +41,19 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
int maxSlots = 0;
|
||||
|
||||
public IMEAdaptor(IMEInventory<IAEItemStack> input, BaseActionSource src) {
|
||||
target = input;
|
||||
this.target = input;
|
||||
this.src = src;
|
||||
}
|
||||
|
||||
IItemList<IAEItemStack> getList()
|
||||
{
|
||||
return target.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
return this.target.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<ItemSlot> iterator()
|
||||
{
|
||||
return new IMEAdaptorIterator( this, getList() );
|
||||
return new IMEAdaptorIterator( this, this.getList() );
|
||||
}
|
||||
|
||||
public ItemStack doRemoveItemsFuzzy(int how_many, ItemStack Filter, IInventoryDestination destination, Actionable type, FuzzyMode fuzzyMode)
|
||||
@@ -64,12 +64,12 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
|
||||
IAEItemStack out = null;
|
||||
|
||||
for (IAEItemStack req : ImmutableList.copyOf( getList().findFuzzy( reqFilter, fuzzyMode ) ))
|
||||
for (IAEItemStack req : ImmutableList.copyOf( this.getList().findFuzzy( reqFilter, fuzzyMode ) ))
|
||||
{
|
||||
if ( req != null )
|
||||
{
|
||||
req.setStackSize( how_many );
|
||||
out = target.extractItems( req, type, src );
|
||||
out = this.target.extractItems( req, type, this.src );
|
||||
if ( out != null )
|
||||
return out.getItemStack();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
|
||||
if ( Filter == null )
|
||||
{
|
||||
IItemList<IAEItemStack> list = getList();
|
||||
IItemList<IAEItemStack> list = this.getList();
|
||||
if ( !list.isEmpty() )
|
||||
req = list.getFirstItem();
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
if ( req != null )
|
||||
{
|
||||
req.setStackSize( how_many );
|
||||
out = target.extractItems( req, type, src );
|
||||
out = this.target.extractItems( req, type, this.src );
|
||||
}
|
||||
|
||||
if ( out != null )
|
||||
@@ -108,29 +108,29 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack removeItems(int how_many, ItemStack Filter, IInventoryDestination destination)
|
||||
{
|
||||
return doRemoveItems( how_many, Filter, destination, Actionable.MODULATE );
|
||||
return this.doRemoveItems( how_many, Filter, destination, Actionable.MODULATE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateRemove(int how_many, ItemStack Filter, IInventoryDestination destination)
|
||||
{
|
||||
return doRemoveItems( how_many, Filter, destination, Actionable.SIMULATE );
|
||||
return this.doRemoveItems( how_many, Filter, destination, Actionable.SIMULATE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeSimilarItems(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
if ( filter == null )
|
||||
return doRemoveItems( how_many, null, destination, Actionable.MODULATE );
|
||||
return doRemoveItemsFuzzy( how_many, filter, destination, Actionable.MODULATE, fuzzyMode );
|
||||
return this.doRemoveItems( how_many, null, destination, Actionable.MODULATE );
|
||||
return this.doRemoveItemsFuzzy( how_many, filter, destination, Actionable.MODULATE, fuzzyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateSimilarRemove(int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination)
|
||||
{
|
||||
if ( filter == null )
|
||||
return doRemoveItems( how_many, null, destination, Actionable.SIMULATE );
|
||||
return doRemoveItemsFuzzy( how_many, filter, destination, Actionable.SIMULATE, fuzzyMode );
|
||||
return this.doRemoveItems( how_many, null, destination, Actionable.SIMULATE );
|
||||
return this.doRemoveItemsFuzzy( how_many, filter, destination, Actionable.SIMULATE, fuzzyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,7 +139,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
IAEItemStack in = AEItemStack.create( A );
|
||||
if ( in != null )
|
||||
{
|
||||
IAEItemStack out = target.injectItems( in, Actionable.MODULATE, src );
|
||||
IAEItemStack out = this.target.injectItems( in, Actionable.MODULATE, this.src );
|
||||
if ( out != null )
|
||||
return out.getItemStack();
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
IAEItemStack in = AEItemStack.create( A );
|
||||
if ( in != null )
|
||||
{
|
||||
IAEItemStack out = target.injectItems( in, Actionable.SIMULATE, src );
|
||||
IAEItemStack out = this.target.injectItems( in, Actionable.SIMULATE, this.src );
|
||||
if ( out != null )
|
||||
return out.getItemStack();
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
return !getList().isEmpty();
|
||||
return !this.getList().isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,36 +35,36 @@ public class IMEAdaptorIterator implements Iterator<ItemSlot>
|
||||
final int containerSize;
|
||||
|
||||
public IMEAdaptorIterator(IMEAdaptor parent, IItemList<IAEItemStack> availableItems) {
|
||||
stack = availableItems.iterator();
|
||||
containerSize = parent.maxSlots;
|
||||
this.stack = availableItems.iterator();
|
||||
this.containerSize = parent.maxSlots;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext()
|
||||
{
|
||||
hasNext = stack.hasNext();
|
||||
return offset < containerSize || hasNext;
|
||||
this.hasNext = this.stack.hasNext();
|
||||
return this.offset < this.containerSize || this.hasNext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSlot next()
|
||||
{
|
||||
slot.slot = offset++;
|
||||
slot.isExtractable=true;
|
||||
this.slot.slot = this.offset++;
|
||||
this.slot.isExtractable=true;
|
||||
|
||||
if ( parent.maxSlots < offset )
|
||||
parent.maxSlots = offset;
|
||||
if ( this.parent.maxSlots < this.offset )
|
||||
this.parent.maxSlots = this.offset;
|
||||
|
||||
if ( hasNext )
|
||||
if ( this.hasNext )
|
||||
{
|
||||
IAEItemStack item = stack.next();
|
||||
slot.setAEItemStack( item );
|
||||
return slot;
|
||||
IAEItemStack item = this.stack.next();
|
||||
this.slot.setAEItemStack( item );
|
||||
return this.slot;
|
||||
}
|
||||
|
||||
slot.setItemStack( null );
|
||||
return slot;
|
||||
this.slot.setItemStack( null );
|
||||
return this.slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,7 @@ public class IMEInventoryDestination implements IInventoryDestination
|
||||
final IMEInventory<IAEItemStack> me;
|
||||
|
||||
public IMEInventoryDestination(IMEInventory<IAEItemStack> o) {
|
||||
me = o;
|
||||
this.me = o;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,7 +40,7 @@ public class IMEInventoryDestination implements IInventoryDestination
|
||||
if ( stack == null )
|
||||
return false;
|
||||
|
||||
IAEItemStack failed = me.injectItems( AEItemStack.create( stack ), Actionable.SIMULATE, null );
|
||||
IAEItemStack failed = this.me.injectItems( AEItemStack.create( stack ), Actionable.SIMULATE, null );
|
||||
|
||||
if ( failed == null )
|
||||
return true;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ItemListIgnoreCrafting<T extends IAEStack> implements IItemList<T>
|
||||
final IItemList<T> target;
|
||||
|
||||
public ItemListIgnoreCrafting(IItemList<T> cla) {
|
||||
target = cla;
|
||||
this.target = cla;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,7 +43,7 @@ public class ItemListIgnoreCrafting<T extends IAEStack> implements IItemList<T>
|
||||
option.setCraftable( false );
|
||||
}
|
||||
|
||||
target.add( option );
|
||||
this.target.add( option );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,54 +55,54 @@ public class ItemListIgnoreCrafting<T extends IAEStack> implements IItemList<T>
|
||||
@Override
|
||||
public T findPrecise(T i)
|
||||
{
|
||||
return target.findPrecise( i );
|
||||
return this.target.findPrecise( i );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<T> findFuzzy(T input, FuzzyMode fuzzy)
|
||||
{
|
||||
return target.findFuzzy( input, fuzzy );
|
||||
return this.target.findFuzzy( input, fuzzy );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return target.isEmpty();
|
||||
return this.target.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addStorage(T option)
|
||||
{
|
||||
target.addStorage( option );
|
||||
this.target.addStorage( option );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRequestable(T option)
|
||||
{
|
||||
target.addRequestable( option );
|
||||
this.target.addRequestable( option );
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getFirstItem()
|
||||
{
|
||||
return target.getFirstItem();
|
||||
return this.target.getFirstItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size()
|
||||
{
|
||||
return target.size();
|
||||
return this.target.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<T> iterator()
|
||||
{
|
||||
return target.iterator();
|
||||
return this.target.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetStatus()
|
||||
{
|
||||
target.resetStatus();
|
||||
this.target.resetStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,24 +35,24 @@ public class ItemSlot
|
||||
|
||||
public void setItemStack(ItemStack is)
|
||||
{
|
||||
aeItemStack = null;
|
||||
itemStack = is;
|
||||
this.aeItemStack = null;
|
||||
this.itemStack = is;
|
||||
}
|
||||
|
||||
public void setAEItemStack(IAEItemStack is)
|
||||
{
|
||||
aeItemStack = is;
|
||||
itemStack = null;
|
||||
this.aeItemStack = is;
|
||||
this.itemStack = null;
|
||||
}
|
||||
|
||||
public ItemStack getItemStack()
|
||||
{
|
||||
return itemStack == null ? (aeItemStack == null ? null : (itemStack = aeItemStack.getItemStack())) : itemStack;
|
||||
return this.itemStack == null ? (this.aeItemStack == null ? null : (this.itemStack = this.aeItemStack.getItemStack())) : this.itemStack;
|
||||
}
|
||||
|
||||
public IAEItemStack getAEItemStack()
|
||||
{
|
||||
return aeItemStack == null ? (itemStack == null ? null : (aeItemStack = AEItemStack.create( itemStack ))) : aeItemStack;
|
||||
return this.aeItemStack == null ? (this.itemStack == null ? null : (this.aeItemStack = AEItemStack.create( this.itemStack ))) : this.aeItemStack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ public class WrapperBCPipe implements IInventory
|
||||
final private ForgeDirection dir;
|
||||
|
||||
public WrapperBCPipe(TileEntity te, ForgeDirection d) {
|
||||
bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
ad = te;
|
||||
dir = d;
|
||||
this.bc = (IBC) AppEng.instance.getIntegration( IntegrationType.BC );
|
||||
this.ad = te;
|
||||
this.dir = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,7 +67,7 @@ public class WrapperBCPipe implements IInventory
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
bc.addItemsToPipe( ad, itemstack, dir );
|
||||
this.bc.addItemsToPipe( this.ad, itemstack, this.dir );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,7 +115,7 @@ public class WrapperBCPipe implements IInventory
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return bc.canAddItemsToPipe( ad, itemstack, dir );
|
||||
return this.bc.canAddItemsToPipe( this.ad, itemstack, this.dir );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,31 +45,31 @@ public class WrapperChainedInventory implements IInventory
|
||||
private HashMap<Integer, InvOffset> offsets;
|
||||
|
||||
public WrapperChainedInventory(IInventory... inventories) {
|
||||
setInventory( inventories );
|
||||
this.setInventory( inventories );
|
||||
}
|
||||
|
||||
public WrapperChainedInventory(List<IInventory> inventories) {
|
||||
setInventory( inventories );
|
||||
this.setInventory( inventories );
|
||||
}
|
||||
|
||||
public void cycleOrder()
|
||||
{
|
||||
if ( l.size() > 1 )
|
||||
if ( this.l.size() > 1 )
|
||||
{
|
||||
List<IInventory> newOrder = new ArrayList<IInventory>( l.size() );
|
||||
newOrder.add( l.get( l.size() - 1 ) );
|
||||
for (int x = 0; x < l.size() - 1; x++)
|
||||
newOrder.add( l.get( x ) );
|
||||
setInventory( newOrder );
|
||||
List<IInventory> newOrder = new ArrayList<IInventory>( this.l.size() );
|
||||
newOrder.add( this.l.get( this.l.size() - 1 ) );
|
||||
for (int x = 0; x < this.l.size() - 1; x++)
|
||||
newOrder.add( this.l.get( x ) );
|
||||
this.setInventory( newOrder );
|
||||
}
|
||||
}
|
||||
|
||||
public void calculateSizes()
|
||||
{
|
||||
offsets = new HashMap<Integer, WrapperChainedInventory.InvOffset>();
|
||||
this.offsets = new HashMap<Integer, WrapperChainedInventory.InvOffset>();
|
||||
|
||||
int offset = 0;
|
||||
for (IInventory in : l)
|
||||
for (IInventory in : this.l)
|
||||
{
|
||||
InvOffset io = new InvOffset();
|
||||
io.offset = offset;
|
||||
@@ -78,30 +78,30 @@ public class WrapperChainedInventory implements IInventory
|
||||
|
||||
for (int y = 0; y < io.size; y++)
|
||||
{
|
||||
offsets.put( y + io.offset, io );
|
||||
this.offsets.put( y + io.offset, io );
|
||||
}
|
||||
|
||||
offset += io.size;
|
||||
}
|
||||
|
||||
fullSize = offset;
|
||||
this.fullSize = offset;
|
||||
}
|
||||
|
||||
public void setInventory(IInventory... a)
|
||||
{
|
||||
l = ImmutableList.copyOf( a );
|
||||
calculateSizes();
|
||||
this.l = ImmutableList.copyOf( a );
|
||||
this.calculateSizes();
|
||||
}
|
||||
|
||||
public void setInventory(List<IInventory> a)
|
||||
{
|
||||
l = a;
|
||||
calculateSizes();
|
||||
this.l = a;
|
||||
this.calculateSizes();
|
||||
}
|
||||
|
||||
public IInventory getInv(int idx)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return io.i;
|
||||
@@ -111,7 +111,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
|
||||
public int getInvSlot(int idx)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return idx - io.offset;
|
||||
@@ -122,13 +122,13 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return fullSize;
|
||||
return this.fullSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int idx)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return io.i.getStackInSlot( idx - io.offset );
|
||||
@@ -139,7 +139,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public ItemStack decrStackSize(int idx, int var2)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return io.i.decrStackSize( idx - io.offset, var2 );
|
||||
@@ -150,7 +150,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int idx)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return io.i.getStackInSlotOnClosing( idx - io.offset );
|
||||
@@ -161,7 +161,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public void setInventorySlotContents(int idx, ItemStack var2)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
io.i.setInventorySlotContents( idx - io.offset, var2 );
|
||||
@@ -179,7 +179,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
{
|
||||
int smallest = 64;
|
||||
|
||||
for (IInventory i : l)
|
||||
for (IInventory i : this.l)
|
||||
smallest = Math.min( smallest, i.getInventoryStackLimit() );
|
||||
|
||||
return smallest;
|
||||
@@ -188,7 +188,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public void markDirty()
|
||||
{
|
||||
for (IInventory i : l)
|
||||
for (IInventory i : this.l)
|
||||
{
|
||||
i.markDirty();
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public class WrapperChainedInventory implements IInventory
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int idx, ItemStack itemstack)
|
||||
{
|
||||
InvOffset io = offsets.get( idx );
|
||||
InvOffset io = this.offsets.get( idx );
|
||||
if ( io != null )
|
||||
{
|
||||
return io.i.isItemValidForSlot( idx - io.offset, itemstack );
|
||||
|
||||
@@ -45,73 +45,73 @@ public class WrapperInvSlot
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return inv.getStackInSlot( slot );
|
||||
return this.inv.getStackInSlot( this.slot );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int num)
|
||||
{
|
||||
return inv.decrStackSize( slot, num );
|
||||
return this.inv.decrStackSize( this.slot, num );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i)
|
||||
{
|
||||
return inv.getStackInSlotOnClosing( slot );
|
||||
return this.inv.getStackInSlotOnClosing( this.slot );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
inv.setInventorySlotContents( slot, itemstack );
|
||||
this.inv.setInventorySlotContents( this.slot, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return inv.getInventoryName();
|
||||
return this.inv.getInventoryName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return inv.hasCustomInventoryName();
|
||||
return this.inv.hasCustomInventoryName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return inv.getInventoryStackLimit();
|
||||
return this.inv.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty()
|
||||
{
|
||||
inv.markDirty();
|
||||
this.inv.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return inv.isUseableByPlayer( entityplayer );
|
||||
return this.inv.isUseableByPlayer( entityplayer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
inv.openInventory();
|
||||
this.inv.openInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
inv.closeInventory();
|
||||
this.inv.closeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return isItemValid( itemstack ) && inv.isItemValidForSlot( slot, itemstack );
|
||||
return WrapperInvSlot.this.isItemValid( itemstack ) && this.inv.isItemValidForSlot( this.slot, itemstack );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class WrapperInvSlot
|
||||
|
||||
public IInventory getWrapper(int slot)
|
||||
{
|
||||
return new InternalInterfaceWrapper( inv, slot );
|
||||
return new InternalInterfaceWrapper( this.inv, slot );
|
||||
}
|
||||
|
||||
protected boolean isItemValid(ItemStack itemstack)
|
||||
|
||||
@@ -48,87 +48,87 @@ public class WrapperInventoryRange implements IInventory
|
||||
}
|
||||
|
||||
public WrapperInventoryRange(IInventory a, int[] s, boolean ignoreValid) {
|
||||
src = a;
|
||||
slots = s;
|
||||
this.src = a;
|
||||
this.slots = s;
|
||||
|
||||
if ( slots == null )
|
||||
slots = new int[0];
|
||||
if ( this.slots == null )
|
||||
this.slots = new int[0];
|
||||
|
||||
ignoreValidItems = ignoreValid;
|
||||
this.ignoreValidItems = ignoreValid;
|
||||
}
|
||||
|
||||
public WrapperInventoryRange(IInventory a, int _min, int _size, boolean ignoreValid) {
|
||||
src = a;
|
||||
slots = new int[_size];
|
||||
this.src = a;
|
||||
this.slots = new int[_size];
|
||||
for (int x = 0; x < _size; x++)
|
||||
slots[x] = _min + x;
|
||||
ignoreValidItems = ignoreValid;
|
||||
this.slots[x] = _min + x;
|
||||
this.ignoreValidItems = ignoreValid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return slots.length;
|
||||
return this.slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int var1)
|
||||
{
|
||||
return src.getStackInSlot( slots[var1] );
|
||||
return this.src.getStackInSlot( this.slots[var1] );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int var1, int var2)
|
||||
{
|
||||
return src.decrStackSize( slots[var1], var2 );
|
||||
return this.src.decrStackSize( this.slots[var1], var2 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int var1)
|
||||
{
|
||||
return src.getStackInSlotOnClosing( slots[var1] );
|
||||
return this.src.getStackInSlotOnClosing( this.slots[var1] );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int var1, ItemStack var2)
|
||||
{
|
||||
src.setInventorySlotContents( slots[var1], var2 );
|
||||
this.src.setInventorySlotContents( this.slots[var1], var2 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return src.getInventoryName();
|
||||
return this.src.getInventoryName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return src.getInventoryStackLimit();
|
||||
return this.src.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty()
|
||||
{
|
||||
src.markDirty();
|
||||
this.src.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer var1)
|
||||
{
|
||||
return src.isUseableByPlayer( var1 );
|
||||
return this.src.isUseableByPlayer( var1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
src.openInventory();
|
||||
this.src.openInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
src.closeInventory();
|
||||
this.src.closeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,10 +140,10 @@ public class WrapperInventoryRange implements IInventory
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
if ( ignoreValidItems )
|
||||
if ( this.ignoreValidItems )
|
||||
return true;
|
||||
|
||||
return src.isItemValidForSlot( slots[i], itemstack );
|
||||
return this.src.isItemValidForSlot( this.slots[i], itemstack );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,19 +30,19 @@ public class WrapperMCISidedInventory extends WrapperInventoryRange implements I
|
||||
|
||||
public WrapperMCISidedInventory(ISidedInventory a, ForgeDirection d) {
|
||||
super( a, a.getAccessibleSlotsFromSide( d.ordinal() ), false );
|
||||
side = a;
|
||||
dir = d;
|
||||
this.side = a;
|
||||
this.dir = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
|
||||
if ( ignoreValidItems )
|
||||
if ( this.ignoreValidItems )
|
||||
return true;
|
||||
|
||||
if ( side.isItemValidForSlot( slots[i], itemstack ) )
|
||||
return side.canInsertItem( slots[i], itemstack, dir.ordinal() );
|
||||
if ( this.side.isItemValidForSlot( this.slots[i], itemstack ) )
|
||||
return this.side.canInsertItem( this.slots[i], itemstack, this.dir.ordinal() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -53,13 +53,13 @@ public class WrapperMCISidedInventory extends WrapperInventoryRange implements I
|
||||
if ( is == null )
|
||||
return false;
|
||||
|
||||
return side.canExtractItem( slots[i], is, dir.ordinal() );
|
||||
return this.side.canExtractItem( this.slots[i], is, this.dir.ordinal() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int var1, int var2)
|
||||
{
|
||||
if ( canRemoveItemFromSlot( var1, getStackInSlot( var1 ) ) )
|
||||
if ( this.canRemoveItemFromSlot( var1, this.getStackInSlot( var1 ) ) )
|
||||
return super.decrStackSize( var1, var2 );
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public class WrapperTEPipe implements IInventory
|
||||
final ForgeDirection dir;
|
||||
|
||||
public WrapperTEPipe(TileEntity te, ForgeDirection d) {
|
||||
ad = te;
|
||||
dir = d;
|
||||
this.ad = te;
|
||||
this.dir = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user