Changed access to use this qualifier
This commit is contained in:
@@ -52,33 +52,33 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
|
||||
public IInventory getCellUpgradeInventory()
|
||||
{
|
||||
IInventory ri = workBench.getCellUpgradeInventory();
|
||||
return ri == null ? ni : ri;
|
||||
IInventory ri = this.workBench.getCellUpgradeInventory();
|
||||
return ri == null ? this.ni : ri;
|
||||
}
|
||||
|
||||
public void setFuzzy(FuzzyMode valueOf)
|
||||
{
|
||||
ICellWorkbenchItem cwi = workBench.getCell();
|
||||
ICellWorkbenchItem cwi = this.workBench.getCell();
|
||||
if ( cwi != null )
|
||||
cwi.setFuzzyMode( workBench.getInventoryByName( "cell" ).getStackInSlot( 0 ), valueOf );
|
||||
cwi.setFuzzyMode( this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 ), valueOf );
|
||||
}
|
||||
|
||||
private FuzzyMode getFuzzyMode()
|
||||
{
|
||||
ICellWorkbenchItem cwi = workBench.getCell();
|
||||
ICellWorkbenchItem cwi = this.workBench.getCell();
|
||||
if ( cwi != null )
|
||||
return cwi.getFuzzyMode( workBench.getInventoryByName( "cell" ).getStackInSlot( 0 ) );
|
||||
return cwi.getFuzzyMode( this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 ) );
|
||||
return FuzzyMode.IGNORE_ALL;
|
||||
}
|
||||
|
||||
public void nextCopyMode()
|
||||
{
|
||||
workBench.getConfigManager().putSetting( Settings.COPY_MODE, Platform.nextEnum( getCopyMode() ) );
|
||||
this.workBench.getConfigManager().putSetting( Settings.COPY_MODE, Platform.nextEnum( this.getCopyMode() ) );
|
||||
}
|
||||
|
||||
public CopyMode getCopyMode()
|
||||
{
|
||||
return (CopyMode) workBench.getConfigManager().getSetting( Settings.COPY_MODE );
|
||||
return (CopyMode) this.workBench.getConfigManager().getSetting( Settings.COPY_MODE );
|
||||
}
|
||||
|
||||
class Upgrades implements IInventory
|
||||
@@ -87,19 +87,19 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return getCellUpgradeInventory().getSizeInventory();
|
||||
return ContainerCellWorkbench.this.getCellUpgradeInventory().getSizeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return getCellUpgradeInventory().getStackInSlot( i );
|
||||
return ContainerCellWorkbench.this.getCellUpgradeInventory().getStackInSlot( i );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j)
|
||||
{
|
||||
IInventory inv = getCellUpgradeInventory();
|
||||
IInventory inv = ContainerCellWorkbench.this.getCellUpgradeInventory();
|
||||
ItemStack is = inv.decrStackSize( i, j );
|
||||
inv.markDirty();
|
||||
return is;
|
||||
@@ -108,7 +108,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i)
|
||||
{
|
||||
IInventory inv = getCellUpgradeInventory();
|
||||
IInventory inv = ContainerCellWorkbench.this.getCellUpgradeInventory();
|
||||
ItemStack is = inv.getStackInSlotOnClosing( i );
|
||||
inv.markDirty();
|
||||
return is;
|
||||
@@ -117,7 +117,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
IInventory inv = getCellUpgradeInventory();
|
||||
IInventory inv = ContainerCellWorkbench.this.getCellUpgradeInventory();
|
||||
inv.setInventorySlotContents( i, itemstack );
|
||||
inv.markDirty();
|
||||
}
|
||||
@@ -165,7 +165,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
||||
return ContainerCellWorkbench.this.getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
|
||||
public ContainerCellWorkbench(InventoryPlayer ip, TileCellWorkbench te) {
|
||||
super( ip, te );
|
||||
workBench = te;
|
||||
this.workBench = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,19 +191,19 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public int availableUpgrades()
|
||||
{
|
||||
ItemStack is = workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
if ( prevStack != is )
|
||||
ItemStack is = this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
if ( this.prevStack != is )
|
||||
{
|
||||
prevStack = is;
|
||||
return lastUpgrades = getCellUpgradeInventory().getSizeInventory();
|
||||
this.prevStack = is;
|
||||
return this.lastUpgrades = this.getCellUpgradeInventory().getSizeInventory();
|
||||
}
|
||||
return lastUpgrades;
|
||||
return this.lastUpgrades;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
return idx < availableUpgrades();
|
||||
return idx < this.availableUpgrades();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -213,23 +213,23 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
int y = 29;
|
||||
int offset = 0;
|
||||
|
||||
IInventory cell = upgradeable.getInventoryByName( "cell" );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
|
||||
IInventory cell = this.upgradeable.getInventoryByName( "cell" );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, this.invPlayer ) );
|
||||
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
this.UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
|
||||
// null, 3 * 8 );
|
||||
|
||||
for (int w = 0; w < 7; w++)
|
||||
for (int z = 0; z < 9; z++)
|
||||
addSlotToContainer( new SlotFakeTypeOnly( inv, offset++, x + z * 18, y + w * 18 ) );
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( inv, offset++, x + z * 18, y + w * 18 ) );
|
||||
|
||||
for (int zz = 0; zz < 3; zz++)
|
||||
for (int z = 0; z < 8; z++)
|
||||
{
|
||||
int iSLot = zz * 8 + z;
|
||||
addSlotToContainer( new OptionalSlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, UpgradeInventoryWrapper, this, iSLot, 187 + zz * 18,
|
||||
8 + 18 * z, iSLot, invPlayer ) );
|
||||
this.addSlotToContainer( new OptionalSlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, this.UpgradeInventoryWrapper, this, iSLot, 187 + zz * 18,
|
||||
8 + 18 * z, iSLot, this.invPlayer ) );
|
||||
}
|
||||
/*
|
||||
* if ( supportCapacity() ) { for (int w = 0; w < 2; w++) for (int z = 0; z < 9; z++) addSlotToContainer( new
|
||||
@@ -249,7 +249,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
public void onUpdate(String field, Object oldValue, Object newValue)
|
||||
{
|
||||
if ( field.equals( "copyMode" ) )
|
||||
workBench.getConfigManager().putSetting( Settings.COPY_MODE, this.copyMode );
|
||||
this.workBench.getConfigManager().putSetting( Settings.COPY_MODE, this.copyMode );
|
||||
|
||||
super.onUpdate( field, oldValue, newValue );
|
||||
}
|
||||
@@ -257,17 +257,17 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
ItemStack is = workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
ItemStack is = this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting) crafter;
|
||||
|
||||
if ( prevStack != is )
|
||||
if ( this.prevStack != is )
|
||||
{
|
||||
// if the bars changed an item was probably made, so just send shit!
|
||||
for (Object s : inventorySlots)
|
||||
for (Object s : this.inventorySlots)
|
||||
{
|
||||
if ( s instanceof OptionalSlotRestrictedInput )
|
||||
{
|
||||
@@ -279,28 +279,28 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
}
|
||||
}
|
||||
|
||||
this.copyMode = getCopyMode();
|
||||
this.fzMode = getFuzzyMode();
|
||||
this.copyMode = this.getCopyMode();
|
||||
this.fzMode = this.getFuzzyMode();
|
||||
}
|
||||
|
||||
prevStack = is;
|
||||
standardDetectAndSendChanges();
|
||||
this.prevStack = is;
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
inv.setInventorySlotContents( x, null );
|
||||
detectAndSendChanges();
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
|
||||
public void partition()
|
||||
{
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
|
||||
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
|
||||
.getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||
.getCellInventory( this.upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||
|
||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||
if ( cellInv != null )
|
||||
@@ -321,7 +321,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
inv.setInventorySlotContents( x, null );
|
||||
}
|
||||
|
||||
detectAndSendChanges();
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ public class ContainerChest extends AEBaseContainer
|
||||
super( ip, chest, null );
|
||||
this.chest = chest;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, this.invPlayer ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ public class ContainerCondenser extends AEBaseContainer implements IProgressProv
|
||||
super( ip, condenser, null );
|
||||
this.condenser = condenser;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) );
|
||||
addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) );
|
||||
this.addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,13 +73,13 @@ public class ContainerCondenser extends AEBaseContainer implements IProgressProv
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return (int) storedPower;
|
||||
return (int) this.storedPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxProgress()
|
||||
{
|
||||
return (int) requiredEnergy;
|
||||
return (int) this.requiredEnergy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,17 +42,17 @@ public class ContainerCraftAmount extends AEBaseContainer
|
||||
|
||||
public ContainerCraftAmount(InventoryPlayer ip, ITerminalHost te) {
|
||||
super( ip, te );
|
||||
priHost = te;
|
||||
this.priHost = te;
|
||||
|
||||
craftingItem = new SlotInaccessible( new AppEngInternalInventory( null, 1 ), 0, 34, 53 );
|
||||
addSlotToContainer( craftingItem );
|
||||
this.craftingItem = new SlotInaccessible( new AppEngInternalInventory( null, 1 ), 0, 34, 53 );
|
||||
this.addSlotToContainer( this.craftingItem );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
verifyPermissions( SecurityPermissions.CRAFT, false );
|
||||
this.verifyPermissions( SecurityPermissions.CRAFT, false );
|
||||
}
|
||||
|
||||
public IGrid getGrid()
|
||||
@@ -63,12 +63,12 @@ public class ContainerCraftAmount extends AEBaseContainer
|
||||
|
||||
public World getWorld()
|
||||
{
|
||||
return getPlayerInv().player.worldObj;
|
||||
return this.getPlayerInv().player.worldObj;
|
||||
}
|
||||
|
||||
public BaseActionSource getActionSrc()
|
||||
{
|
||||
return new PlayerSource( getPlayerInv().player, (IActionHost) getTarget() );
|
||||
return new PlayerSource( this.getPlayerInv().player, (IActionHost) this.getTarget() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,51 +98,51 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
|
||||
public ContainerCraftConfirm(InventoryPlayer ip, ITerminalHost te) {
|
||||
super( ip, te );
|
||||
priHost = te;
|
||||
this.priHost = te;
|
||||
}
|
||||
|
||||
private void sendCPUs()
|
||||
{
|
||||
Collections.sort( cpus );
|
||||
Collections.sort( this.cpus );
|
||||
|
||||
if ( selectedCpu >= cpus.size() )
|
||||
if ( this.selectedCpu >= this.cpus.size() )
|
||||
{
|
||||
selectedCpu = -1;
|
||||
cpuBytesAvail = 0;
|
||||
cpuCoProcessors = 0;
|
||||
myName = "";
|
||||
this.selectedCpu = -1;
|
||||
this.cpuBytesAvail = 0;
|
||||
this.cpuCoProcessors = 0;
|
||||
this.myName = "";
|
||||
}
|
||||
else if ( selectedCpu != -1 )
|
||||
else if ( this.selectedCpu != -1 )
|
||||
{
|
||||
myName = cpus.get( selectedCpu ).myName;
|
||||
cpuBytesAvail = cpus.get( selectedCpu ).size;
|
||||
cpuCoProcessors = cpus.get( selectedCpu ).processors;
|
||||
this.myName = this.cpus.get( this.selectedCpu ).myName;
|
||||
this.cpuBytesAvail = this.cpus.get( this.selectedCpu ).size;
|
||||
this.cpuCoProcessors = this.cpus.get( this.selectedCpu ).processors;
|
||||
}
|
||||
}
|
||||
|
||||
public void cycleCpu(boolean next)
|
||||
{
|
||||
if ( next )
|
||||
selectedCpu++;
|
||||
this.selectedCpu++;
|
||||
else
|
||||
selectedCpu--;
|
||||
this.selectedCpu--;
|
||||
|
||||
if ( selectedCpu < -1 )
|
||||
selectedCpu = cpus.size() - 1;
|
||||
else if ( selectedCpu >= cpus.size() )
|
||||
selectedCpu = -1;
|
||||
if ( this.selectedCpu < -1 )
|
||||
this.selectedCpu = this.cpus.size() - 1;
|
||||
else if ( this.selectedCpu >= this.cpus.size() )
|
||||
this.selectedCpu = -1;
|
||||
|
||||
if ( selectedCpu == -1 )
|
||||
if ( this.selectedCpu == -1 )
|
||||
{
|
||||
cpuBytesAvail = 0;
|
||||
cpuCoProcessors = 0;
|
||||
myName = "";
|
||||
this.cpuBytesAvail = 0;
|
||||
this.cpuCoProcessors = 0;
|
||||
this.myName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
myName = cpus.get( selectedCpu ).myName;
|
||||
cpuBytesAvail = cpus.get( selectedCpu ).size;
|
||||
cpuCoProcessors = cpus.get( selectedCpu ).processors;
|
||||
this.myName = this.cpus.get( this.selectedCpu ).myName;
|
||||
this.cpuBytesAvail = this.cpus.get( this.selectedCpu ).size;
|
||||
this.cpuCoProcessors = this.cpus.get( this.selectedCpu ).processors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
if ( Platform.isClient() )
|
||||
return;
|
||||
|
||||
ICraftingGrid cc = getGrid().getCache( ICraftingGrid.class );
|
||||
ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
||||
ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus();
|
||||
|
||||
int matches = 0;
|
||||
@@ -160,11 +160,11 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
for (ICraftingCPU c : cpuSet)
|
||||
{
|
||||
boolean found = false;
|
||||
for (CraftingCPURecord ccr : cpus)
|
||||
for (CraftingCPURecord ccr : this.cpus)
|
||||
if ( ccr.cpu == c )
|
||||
found = true;
|
||||
|
||||
boolean matched = cpuMatches( c );
|
||||
boolean matched = this.cpuMatches( c );
|
||||
|
||||
if ( matched )
|
||||
matches++;
|
||||
@@ -173,50 +173,50 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if ( changed || cpus.size() != matches )
|
||||
if ( changed || this.cpus.size() != matches )
|
||||
{
|
||||
cpus.clear();
|
||||
this.cpus.clear();
|
||||
for (ICraftingCPU c : cpuSet)
|
||||
{
|
||||
if ( cpuMatches( c ) )
|
||||
cpus.add( new CraftingCPURecord( c.getAvailableStorage(), c.getCoProcessors(), c ) );
|
||||
if ( this.cpuMatches( c ) )
|
||||
this.cpus.add( new CraftingCPURecord( c.getAvailableStorage(), c.getCoProcessors(), c ) );
|
||||
}
|
||||
|
||||
sendCPUs();
|
||||
this.sendCPUs();
|
||||
}
|
||||
|
||||
noCPU = cpus.size() == 0;
|
||||
this.noCPU = this.cpus.size() == 0;
|
||||
|
||||
super.detectAndSendChanges();
|
||||
|
||||
if ( job != null && job.isDone() )
|
||||
if ( this.job != null && this.job.isDone() )
|
||||
{
|
||||
try
|
||||
{
|
||||
result = job.get();
|
||||
this.result = this.job.get();
|
||||
|
||||
if ( !result.isSimulation() )
|
||||
if ( !this.result.isSimulation() )
|
||||
{
|
||||
simulation = false;
|
||||
if ( autoStart )
|
||||
this.simulation = false;
|
||||
if ( this.autoStart )
|
||||
{
|
||||
startJob();
|
||||
this.startJob();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
simulation = true;
|
||||
this.simulation = true;
|
||||
|
||||
try
|
||||
{
|
||||
PacketMEInventoryUpdate a = new PacketMEInventoryUpdate( (byte) 0 );
|
||||
PacketMEInventoryUpdate b = new PacketMEInventoryUpdate( (byte) 1 );
|
||||
PacketMEInventoryUpdate c = result.isSimulation() ? new PacketMEInventoryUpdate( (byte) 2 ) : null;
|
||||
PacketMEInventoryUpdate c = this.result.isSimulation() ? new PacketMEInventoryUpdate( (byte) 2 ) : null;
|
||||
|
||||
IItemList<IAEItemStack> plan = AEApi.instance().storage().createItemList();
|
||||
result.populatePlan( plan );
|
||||
this.result.populatePlan( plan );
|
||||
|
||||
bytesUsed = result.getByteTotal();
|
||||
this.bytesUsed = this.result.getByteTotal();
|
||||
|
||||
for (IAEItemStack out : plan)
|
||||
{
|
||||
@@ -230,13 +230,13 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
p.reset();
|
||||
p.setStackSize( out.getCountRequestable() );
|
||||
|
||||
IStorageGrid sg = getGrid().getCache( IStorageGrid.class );
|
||||
IStorageGrid sg = this.getGrid().getCache( IStorageGrid.class );
|
||||
IMEInventory<IAEItemStack> items = sg.getItemInventory();
|
||||
|
||||
if ( c != null && result.isSimulation() )
|
||||
if ( c != null && this.result.isSimulation() )
|
||||
{
|
||||
m = o.copy();
|
||||
o = items.extractItems( o, Actionable.SIMULATE, mySrc );
|
||||
o = items.extractItems( o, Actionable.SIMULATE, this.mySrc );
|
||||
|
||||
if ( o == null )
|
||||
{
|
||||
@@ -275,27 +275,27 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
getPlayerInv().player.addChatMessage( new ChatComponentText( "Error: " + e.toString() ) );
|
||||
this.getPlayerInv().player.addChatMessage( new ChatComponentText( "Error: " + e.toString() ) );
|
||||
AELog.error( e );
|
||||
this.isContainerValid = false;
|
||||
result = null;
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
job = null;
|
||||
this.job = null;
|
||||
}
|
||||
verifyPermissions( SecurityPermissions.CRAFT, false );
|
||||
this.verifyPermissions( SecurityPermissions.CRAFT, false );
|
||||
}
|
||||
|
||||
private boolean cpuMatches(ICraftingCPU c)
|
||||
{
|
||||
return c.getAvailableStorage() >= bytesUsed && !c.isBusy();
|
||||
return c.getAvailableStorage() >= this.bytesUsed && !c.isBusy();
|
||||
}
|
||||
|
||||
public void startJob()
|
||||
{
|
||||
GuiBridge OriginalGui = null;
|
||||
|
||||
IActionHost ah = getActionHost();
|
||||
IActionHost ah = this.getActionHost();
|
||||
if ( ah instanceof WirelessTerminalGuiObject )
|
||||
OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
|
||||
@@ -308,17 +308,17 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
if ( ah instanceof PartPatternTerminal )
|
||||
OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
|
||||
if ( result != null && !simulation )
|
||||
if ( this.result != null && !this.simulation )
|
||||
{
|
||||
ICraftingGrid cc = getGrid().getCache( ICraftingGrid.class );
|
||||
ICraftingLink g = cc.submitJob( result, null, selectedCpu == -1 ? null : cpus.get( selectedCpu ).cpu, true, getActionSrc() );
|
||||
autoStart = false;
|
||||
if ( g != null && OriginalGui != null && openContext != null )
|
||||
ICraftingGrid cc = this.getGrid().getCache( ICraftingGrid.class );
|
||||
ICraftingLink g = cc.submitJob( this.result, null, this.selectedCpu == -1 ? null : this.cpus.get( this.selectedCpu ).cpu, true, this.getActionSrc() );
|
||||
this.autoStart = false;
|
||||
if ( g != null && OriginalGui != null && this.openContext != null )
|
||||
{
|
||||
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) invPlayer.player );
|
||||
NetworkHandler.instance.sendTo( new PacketSwitchGuis( OriginalGui ), (EntityPlayerMP) this.invPlayer.player );
|
||||
|
||||
TileEntity te = openContext.getTile();
|
||||
Platform.openGUI( invPlayer.player, te, openContext.side, OriginalGui );
|
||||
TileEntity te = this.openContext.getTile();
|
||||
Platform.openGUI( this.invPlayer.player, te, this.openContext.side, OriginalGui );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,10 +327,10 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
public void onContainerClosed(EntityPlayer par1EntityPlayer)
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
if ( job != null )
|
||||
if ( this.job != null )
|
||||
{
|
||||
job.cancel( true );
|
||||
job = null;
|
||||
this.job.cancel( true );
|
||||
this.job = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,10 +338,10 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
public void removeCraftingFromCrafters(ICrafting c)
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
if ( job != null )
|
||||
if ( this.job != null )
|
||||
{
|
||||
job.cancel( true );
|
||||
job = null;
|
||||
this.job.cancel( true );
|
||||
this.job = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,11 +353,11 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
|
||||
public World getWorld()
|
||||
{
|
||||
return getPlayerInv().player.worldObj;
|
||||
return this.getPlayerInv().player.worldObj;
|
||||
}
|
||||
|
||||
public BaseActionSource getActionSrc()
|
||||
{
|
||||
return new PlayerSource( getPlayerInv().player, (IActionHost) getTarget() );
|
||||
return new PlayerSource( this.getPlayerInv().player, (IActionHost) this.getTarget() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,25 +61,25 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
|
||||
if ( host != null )
|
||||
{
|
||||
findNode( host, ForgeDirection.UNKNOWN );
|
||||
this.findNode( host, ForgeDirection.UNKNOWN );
|
||||
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
|
||||
findNode( host, d );
|
||||
this.findNode( host, d );
|
||||
}
|
||||
|
||||
if ( te instanceof TileCraftingTile )
|
||||
setCPU( (ICraftingCPU) ((TileCraftingTile) te).getCluster() );
|
||||
this.setCPU( (ICraftingCPU) ((TileCraftingTile) te).getCluster() );
|
||||
|
||||
if ( network == null && Platform.isServer() )
|
||||
isContainerValid = false;
|
||||
if ( this.network == null && Platform.isServer() )
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
|
||||
protected void setCPU(ICraftingCPU c)
|
||||
{
|
||||
if ( c == monitor )
|
||||
if ( c == this.monitor )
|
||||
return;
|
||||
|
||||
if ( monitor != null )
|
||||
monitor.removeListener( this );
|
||||
if ( this.monitor != null )
|
||||
this.monitor.removeListener( this );
|
||||
|
||||
for (Object g : this.crafters)
|
||||
{
|
||||
@@ -98,38 +98,38 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
|
||||
if ( c instanceof CraftingCPUCluster )
|
||||
{
|
||||
cpuName = c.getName();
|
||||
this.cpuName = c.getName();
|
||||
|
||||
monitor = (CraftingCPUCluster) c;
|
||||
if ( monitor != null )
|
||||
this.monitor = (CraftingCPUCluster) c;
|
||||
if ( this.monitor != null )
|
||||
{
|
||||
list.resetStatus();
|
||||
monitor.getListOfItem( list, CraftingItemList.ALL );
|
||||
monitor.addListener( this, null );
|
||||
this.list.resetStatus();
|
||||
this.monitor.getListOfItem( this.list, CraftingItemList.ALL );
|
||||
this.monitor.addListener( this, null );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
monitor = null;
|
||||
cpuName = "";
|
||||
this.monitor = null;
|
||||
this.cpuName = "";
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelCrafting()
|
||||
{
|
||||
if ( monitor != null )
|
||||
if ( this.monitor != null )
|
||||
{
|
||||
monitor.cancel();
|
||||
this.monitor.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void findNode(IGridHost host, ForgeDirection d)
|
||||
{
|
||||
if ( network == null )
|
||||
if ( this.network == null )
|
||||
{
|
||||
IGridNode node = host.getGridNode( d );
|
||||
if ( node != null )
|
||||
network = node.getGrid();
|
||||
this.network = node.getGrid();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
public void onContainerClosed(EntityPlayer player)
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
if ( monitor != null )
|
||||
monitor.removeListener( this );
|
||||
if ( this.monitor != null )
|
||||
this.monitor.removeListener( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -148,14 +148,14 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
|
||||
if ( this.crafters.isEmpty() && monitor != null )
|
||||
monitor.removeListener( this );
|
||||
if ( this.crafters.isEmpty() && this.monitor != null )
|
||||
this.monitor.removeListener( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
if ( Platform.isServer() && monitor != null && !list.isEmpty() )
|
||||
if ( Platform.isServer() && this.monitor != null && !this.list.isEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -163,14 +163,14 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
PacketMEInventoryUpdate b = new PacketMEInventoryUpdate( (byte) 1 );
|
||||
PacketMEInventoryUpdate c = new PacketMEInventoryUpdate( (byte) 2 );
|
||||
|
||||
for (IAEItemStack out : list)
|
||||
for (IAEItemStack out : this.list)
|
||||
{
|
||||
a.appendItem( monitor.getItemStack( out, CraftingItemList.STORAGE ) );
|
||||
b.appendItem( monitor.getItemStack( out, CraftingItemList.ACTIVE ) );
|
||||
c.appendItem( monitor.getItemStack( out, CraftingItemList.PENDING ) );
|
||||
a.appendItem( this.monitor.getItemStack( out, CraftingItemList.STORAGE ) );
|
||||
b.appendItem( this.monitor.getItemStack( out, CraftingItemList.ACTIVE ) );
|
||||
c.appendItem( this.monitor.getItemStack( out, CraftingItemList.PENDING ) );
|
||||
}
|
||||
|
||||
list.resetStatus();
|
||||
this.list.resetStatus();
|
||||
|
||||
for (Object g : this.crafters)
|
||||
{
|
||||
@@ -209,7 +209,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
{
|
||||
is = is.copy();
|
||||
is.setStackSize( 1 );
|
||||
list.add( is );
|
||||
this.list.add( is );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,12 +222,12 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
@Override
|
||||
public String getCustomName()
|
||||
{
|
||||
return cpuName;
|
||||
return this.cpuName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomName()
|
||||
{
|
||||
return cpuName != null && cpuName.length() > 0;
|
||||
return this.cpuName != null && this.cpuName.length() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,34 +45,34 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
|
||||
private void sendCPUs()
|
||||
{
|
||||
Collections.sort( cpus );
|
||||
Collections.sort( this.cpus );
|
||||
|
||||
if ( selectedCpu >= cpus.size() )
|
||||
if ( this.selectedCpu >= this.cpus.size() )
|
||||
{
|
||||
selectedCpu = -1;
|
||||
myName = "";
|
||||
this.selectedCpu = -1;
|
||||
this.myName = "";
|
||||
}
|
||||
else if ( selectedCpu != -1 )
|
||||
else if ( this.selectedCpu != -1 )
|
||||
{
|
||||
myName = cpus.get( selectedCpu ).myName;
|
||||
this.myName = this.cpus.get( this.selectedCpu ).myName;
|
||||
}
|
||||
|
||||
if ( selectedCpu == -1 && cpus.size() > 0 )
|
||||
selectedCpu = 0;
|
||||
if ( this.selectedCpu == -1 && this.cpus.size() > 0 )
|
||||
this.selectedCpu = 0;
|
||||
|
||||
if ( selectedCpu != -1 )
|
||||
if ( this.selectedCpu != -1 )
|
||||
{
|
||||
if ( cpus.get( selectedCpu ).cpu != monitor )
|
||||
setCPU( cpus.get( selectedCpu ).cpu );
|
||||
if ( this.cpus.get( this.selectedCpu ).cpu != this.monitor )
|
||||
this.setCPU( this.cpus.get( this.selectedCpu ).cpu );
|
||||
}
|
||||
else
|
||||
setCPU( null );
|
||||
this.setCPU( null );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
ICraftingGrid cc = network.getCache( ICraftingGrid.class );
|
||||
ICraftingGrid cc = this.network.getCache( ICraftingGrid.class );
|
||||
ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus();
|
||||
|
||||
int matches = 0;
|
||||
@@ -80,11 +80,11 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
for (ICraftingCPU c : cpuSet)
|
||||
{
|
||||
boolean found = false;
|
||||
for (CraftingCPURecord ccr : cpus)
|
||||
for (CraftingCPURecord ccr : this.cpus)
|
||||
if ( ccr.cpu == c )
|
||||
found = true;
|
||||
|
||||
boolean matched = cpuMatches( c );
|
||||
boolean matched = this.cpuMatches( c );
|
||||
|
||||
if ( matched )
|
||||
matches++;
|
||||
@@ -93,19 +93,19 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if ( changed || cpus.size() != matches )
|
||||
if ( changed || this.cpus.size() != matches )
|
||||
{
|
||||
cpus.clear();
|
||||
this.cpus.clear();
|
||||
for (ICraftingCPU c : cpuSet)
|
||||
{
|
||||
if ( cpuMatches( c ) )
|
||||
cpus.add( new CraftingCPURecord( c.getAvailableStorage(), c.getCoProcessors(), c ) );
|
||||
if ( this.cpuMatches( c ) )
|
||||
this.cpus.add( new CraftingCPURecord( c.getAvailableStorage(), c.getCoProcessors(), c ) );
|
||||
}
|
||||
|
||||
sendCPUs();
|
||||
this.sendCPUs();
|
||||
}
|
||||
|
||||
noCPU = cpus.size() == 0;
|
||||
this.noCPU = this.cpus.size() == 0;
|
||||
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
@@ -122,27 +122,27 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
public void cycleCpu(boolean next)
|
||||
{
|
||||
if ( next )
|
||||
selectedCpu++;
|
||||
this.selectedCpu++;
|
||||
else
|
||||
selectedCpu--;
|
||||
this.selectedCpu--;
|
||||
|
||||
if ( selectedCpu < -1 )
|
||||
selectedCpu = cpus.size() - 1;
|
||||
else if ( selectedCpu >= cpus.size() )
|
||||
selectedCpu = -1;
|
||||
if ( this.selectedCpu < -1 )
|
||||
this.selectedCpu = this.cpus.size() - 1;
|
||||
else if ( this.selectedCpu >= this.cpus.size() )
|
||||
this.selectedCpu = -1;
|
||||
|
||||
if ( selectedCpu == -1 && cpus.size() > 0 )
|
||||
selectedCpu = 0;
|
||||
if ( this.selectedCpu == -1 && this.cpus.size() > 0 )
|
||||
this.selectedCpu = 0;
|
||||
|
||||
if ( selectedCpu == -1 )
|
||||
if ( this.selectedCpu == -1 )
|
||||
{
|
||||
myName = "";
|
||||
setCPU( null );
|
||||
this.myName = "";
|
||||
this.setCPU( null );
|
||||
}
|
||||
else
|
||||
{
|
||||
myName = cpus.get( selectedCpu ).myName;
|
||||
setCPU( cpus.get( selectedCpu ).cpu );
|
||||
this.myName = this.cpus.get( this.selectedCpu ).myName;
|
||||
this.setCPU( this.cpus.get( this.selectedCpu ).cpu );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,26 +53,26 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
|
||||
InventoryCrafting ic = new InventoryCrafting( cn, 3, 3 );
|
||||
|
||||
for (int x = 0; x < 9; x++)
|
||||
ic.setInventorySlotContents( x, craftingSlots[x].getStack() );
|
||||
ic.setInventorySlotContents( x, this.craftingSlots[x].getStack() );
|
||||
|
||||
outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, getPlayerInv().player.worldObj ) );
|
||||
this.outputSlot.putStack( CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj ) );
|
||||
}
|
||||
|
||||
public ContainerCraftingTerm(InventoryPlayer ip, ITerminalHost monitorable) {
|
||||
super( ip, monitorable, false );
|
||||
ct = (PartCraftingTerminal) monitorable;
|
||||
this.ct = (PartCraftingTerminal) monitorable;
|
||||
|
||||
IInventory crafting = ct.getInventoryByName( "crafting" );
|
||||
IInventory crafting = this.ct.getInventoryByName( "crafting" );
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
addSlotToContainer( craftingSlots[x + y * 3] = new SlotCraftingMatrix( this, crafting, x + y * 3, 37 + x * 18, -72 + y * 18 ) );
|
||||
this.addSlotToContainer( this.craftingSlots[x + y * 3] = new SlotCraftingMatrix( this, crafting, x + y * 3, 37 + x * 18, -72 + y * 18 ) );
|
||||
|
||||
addSlotToContainer( outputSlot = new SlotCraftingTerm( getPlayerInv().player, mySrc, powerSrc, monitorable, crafting, crafting, output, 131, -72 + 18, this ) );
|
||||
this.addSlotToContainer( this.outputSlot = new SlotCraftingTerm( this.getPlayerInv().player, this.mySrc, this.powerSrc, monitorable, crafting, crafting, this.output, 131, -72 + 18, this ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
|
||||
onCraftMatrixChanged( crafting );
|
||||
this.onCraftMatrixChanged( crafting );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,9 +92,9 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
|
||||
{
|
||||
if (name.equals("player"))
|
||||
{
|
||||
return invPlayer;
|
||||
return this.invPlayer;
|
||||
}
|
||||
return ct.getInventoryByName( name );
|
||||
return this.ct.getInventoryByName( name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,10 +35,10 @@ public class ContainerDrive extends AEBaseContainer
|
||||
for (int y = 0; y < 5; y++)
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, this.invPlayer ) );
|
||||
}
|
||||
|
||||
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
|
||||
public ContainerFormationPlane(InventoryPlayer ip, PartFormationPlane te) {
|
||||
super( ip, te );
|
||||
storageBus = te;
|
||||
this.storageBus = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,7 +63,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
int upgrades = this.upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
|
||||
return upgrades > idx;
|
||||
}
|
||||
@@ -74,37 +74,37 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
int xo = 8;
|
||||
int yo = 23 + 6;
|
||||
|
||||
IInventory config = upgradeable.getInventoryByName( "config" );
|
||||
IInventory config = this.upgradeable.getInventoryByName( "config" );
|
||||
for (int y = 0; y < 7; y++)
|
||||
{
|
||||
for (int x = 0; x < 9; x++)
|
||||
{
|
||||
if ( y < 2 )
|
||||
addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
|
||||
else
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y - 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y - 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() );
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.invPlayer )).setNotDraggable() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,17 +34,17 @@ public class ContainerGrinder extends AEBaseContainer
|
||||
super( ip, grinder, null );
|
||||
this.grinder = grinder;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, this.invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, this.invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, this.invPlayer ) );
|
||||
|
||||
addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
|
||||
this.addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
|
||||
|
||||
addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
||||
this.addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) );
|
||||
this.addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
||||
this.addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||
|
||||
public ContainerIOPort(InventoryPlayer ip, TileIOPort te) {
|
||||
super( ip, te );
|
||||
ioPort = te;
|
||||
this.ioPort = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,37 +72,37 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||
int offX = 19;
|
||||
int offY = 17;
|
||||
|
||||
IInventory cells = upgradeable.getInventoryByName( "cells" );
|
||||
IInventory cells = this.upgradeable.getInventoryByName( "cells" );
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 2; x++)
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, this.invPlayer ) );
|
||||
|
||||
offX = 122;
|
||||
offY = 17;
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 2; x++)
|
||||
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
|
||||
this.addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
|
||||
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.opMode = (OperationMode) upgradeable.getConfigManager().getSetting( Settings.OPERATION_MODE );
|
||||
this.opMode = (OperationMode) this.upgradeable.getConfigManager().getSetting( Settings.OPERATION_MODE );
|
||||
this.fMode = (FullnessMode) this.upgradeable.getConfigManager().getSetting( Settings.FULLNESS_MODE );
|
||||
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,15 +49,15 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
public ContainerInscriber(InventoryPlayer ip, TileInscriber te)
|
||||
{
|
||||
super( ip, te );
|
||||
ti = te;
|
||||
this.ti = te;
|
||||
|
||||
addSlotToContainer( top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, ti, 0, 45, 16, invPlayer ) );
|
||||
addSlotToContainer( bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, ti, 1, 45, 62, invPlayer ) );
|
||||
addSlotToContainer( middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, ti, 2, 63, 39, invPlayer ) );
|
||||
this.addSlotToContainer( this.top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, this.ti, 0, 45, 16, this.invPlayer ) );
|
||||
this.addSlotToContainer( this.bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, this.ti, 1, 45, 62, this.invPlayer ) );
|
||||
this.addSlotToContainer( this.middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, this.ti, 2, 63, 39, this.invPlayer ) );
|
||||
|
||||
addSlotToContainer( new SlotOutput( ti, 3, 113, 40, -1 ) );
|
||||
this.addSlotToContainer( new SlotOutput( this.ti, 3, 113, 40, -1 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, this.getHeight() - /* height of player inventory */82 );
|
||||
|
||||
}
|
||||
|
||||
@@ -85,16 +85,16 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
*/
|
||||
protected void setupConfig()
|
||||
{
|
||||
setupUpgrades();
|
||||
this.setupUpgrades();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidForSlot(Slot s, ItemStack is)
|
||||
{
|
||||
ItemStack PlateA = ti.getStackInSlot( 0 );
|
||||
ItemStack PlateB = ti.getStackInSlot( 1 );
|
||||
ItemStack PlateA = this.ti.getStackInSlot( 0 );
|
||||
ItemStack PlateB = this.ti.getStackInSlot( 1 );
|
||||
|
||||
if ( s == middle )
|
||||
if ( s == this.middle )
|
||||
{
|
||||
for (ItemStack i : Inscribe.plates)
|
||||
{
|
||||
@@ -129,14 +129,14 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( (s == top && PlateB != null) || (s == bottom && PlateA != null) )
|
||||
if ( (s == this.top && PlateB != null) || (s == this.bottom && PlateA != null) )
|
||||
{
|
||||
boolean isValid = false;
|
||||
ItemStack otherSlot = null;
|
||||
if ( s == top )
|
||||
otherSlot = bottom.getStack();
|
||||
if ( s == this.top )
|
||||
otherSlot = this.bottom.getStack();
|
||||
else
|
||||
otherSlot = top.getStack();
|
||||
otherSlot = this.top.getStack();
|
||||
|
||||
// name presses
|
||||
if ( AEApi.instance().materials().materialNamePress.sameAsStack( otherSlot ) )
|
||||
@@ -168,24 +168,24 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.maxProcessingTime = ti.maxProcessingTime;
|
||||
this.processingTime = ti.processingTime;
|
||||
this.maxProcessingTime = this.ti.maxProcessingTime;
|
||||
this.processingTime = this.ti.processingTime;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return processingTime;
|
||||
return this.processingTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxProgress()
|
||||
{
|
||||
return maxProcessingTime;
|
||||
return this.maxProcessingTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,16 +44,16 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
public ContainerInterface(InventoryPlayer ip, IInterfaceHost te) {
|
||||
super( ip, te.getInterfaceDuality().getHost() );
|
||||
|
||||
myDuality = te.getInterfaceDuality();
|
||||
this.myDuality = te.getInterfaceDuality();
|
||||
|
||||
for (int x = 0; x < 9; x++)
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.invPlayer ) );
|
||||
|
||||
for (int x = 0; x < 8; x++)
|
||||
addSlotToContainer( new SlotFake( myDuality.getConfig(), x, 17 + 18 * x, 35 ) );
|
||||
this.addSlotToContainer( new SlotFake( this.myDuality.getConfig(), x, 17 + 18 * x, 35 ) );
|
||||
|
||||
for (int x = 0; x < 8; x++)
|
||||
addSlotToContainer( new SlotNormal( myDuality.getStorage(), x, 17 + 18 * x, 35 + 18 ) );
|
||||
this.addSlotToContainer( new SlotNormal( this.myDuality.getStorage(), x, 17 + 18 * x, 35 + 18 ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
@Override
|
||||
protected void setupConfig()
|
||||
{
|
||||
setupUpgrades();
|
||||
this.setupUpgrades();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +85,7 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
final String unlocalizedName;
|
||||
|
||||
public InvTracker(DualityInterface dual, IInventory patterns, String unlocalizedName) {
|
||||
server = patterns;
|
||||
client = new AppEngInternalInventory( null, server.getSizeInventory() );
|
||||
this.server = patterns;
|
||||
this.client = new AppEngInternalInventory( null, this.server.getSizeInventory() );
|
||||
this.unlocalizedName = unlocalizedName;
|
||||
this.sortBy = dual.getSortValue();
|
||||
}
|
||||
@@ -89,9 +89,9 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
super( ip, anchor );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
g = anchor.getActionableNode().getGrid();
|
||||
this.g = anchor.getActionableNode().getGrid();
|
||||
|
||||
bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
@@ -114,7 +114,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
@Override
|
||||
public void doAction(EntityPlayerMP player, InventoryAction action, int slot, long id)
|
||||
{
|
||||
InvTracker inv = byId.get( id );
|
||||
InvTracker inv = this.byId.get( id );
|
||||
if ( inv != null )
|
||||
{
|
||||
ItemStack is = inv.server.getStackInSlot( slot );
|
||||
@@ -210,7 +210,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
return;
|
||||
}
|
||||
|
||||
updateHeld( player );
|
||||
this.updateHeld( player );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,19 +222,19 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
|
||||
super.detectAndSendChanges();
|
||||
|
||||
if ( g == null )
|
||||
if ( this.g == null )
|
||||
return;
|
||||
|
||||
int total = 0;
|
||||
boolean missing = false;
|
||||
|
||||
IActionHost host = getActionHost();
|
||||
IActionHost host = this.getActionHost();
|
||||
if ( host != null )
|
||||
{
|
||||
IGridNode agn = host.getActionableNode();
|
||||
if ( agn != null && agn.isActive() )
|
||||
{
|
||||
for (IGridNode gn : g.getMachines( TileInterface.class ))
|
||||
for (IGridNode gn : this.g.getMachines( TileInterface.class ))
|
||||
{
|
||||
if ( gn.isActive() )
|
||||
{
|
||||
@@ -242,7 +242,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
if ( ih.getInterfaceDuality().getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.NO )
|
||||
continue;
|
||||
|
||||
InvTracker t = diList.get( ih );
|
||||
InvTracker t = this.diList.get( ih );
|
||||
|
||||
if ( t == null )
|
||||
missing = true;
|
||||
@@ -257,7 +257,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
for (IGridNode gn : g.getMachines( PartInterface.class ))
|
||||
for (IGridNode gn : this.g.getMachines( PartInterface.class ))
|
||||
{
|
||||
if ( gn.isActive() )
|
||||
{
|
||||
@@ -265,7 +265,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
if ( ih.getInterfaceDuality().getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.NO )
|
||||
continue;
|
||||
|
||||
InvTracker t = diList.get( ih );
|
||||
InvTracker t = this.diList.get( ih );
|
||||
|
||||
if ( t == null )
|
||||
missing = true;
|
||||
@@ -282,33 +282,33 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
if ( total != diList.size() || missing )
|
||||
regenList( data );
|
||||
if ( total != this.diList.size() || missing )
|
||||
this.regenList( this.data );
|
||||
else
|
||||
{
|
||||
for (Entry<IInterfaceHost, InvTracker> en : diList.entrySet())
|
||||
for (Entry<IInterfaceHost, InvTracker> en : this.diList.entrySet())
|
||||
{
|
||||
InvTracker inv = en.getValue();
|
||||
for (int x = 0; x < inv.server.getSizeInventory(); x++)
|
||||
{
|
||||
if ( isDifferent( inv.server.getStackInSlot( x ), inv.client.getStackInSlot( x ) ) )
|
||||
addItems( data, inv, x, 1 );
|
||||
if ( this.isDifferent( inv.server.getStackInSlot( x ), inv.client.getStackInSlot( x ) ) )
|
||||
this.addItems( this.data, inv, x, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !data.hasNoTags() )
|
||||
if ( !this.data.hasNoTags() )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendTo( new PacketCompressedNBT( data ), (EntityPlayerMP) getPlayerInv().player );
|
||||
NetworkHandler.instance.sendTo( new PacketCompressedNBT( this.data ), (EntityPlayerMP) this.getPlayerInv().player );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// :P
|
||||
}
|
||||
|
||||
data = new NBTTagCompound();
|
||||
this.data = new NBTTagCompound();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,40 +325,40 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
|
||||
private void regenList(NBTTagCompound data)
|
||||
{
|
||||
byId.clear();
|
||||
diList.clear();
|
||||
this.byId.clear();
|
||||
this.diList.clear();
|
||||
|
||||
IActionHost host = getActionHost();
|
||||
IActionHost host = this.getActionHost();
|
||||
if ( host != null )
|
||||
{
|
||||
IGridNode agn = host.getActionableNode();
|
||||
if ( agn != null && agn.isActive() )
|
||||
{
|
||||
for (IGridNode gn : g.getMachines( TileInterface.class ))
|
||||
for (IGridNode gn : this.g.getMachines( TileInterface.class ))
|
||||
{
|
||||
IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
|
||||
DualityInterface dual = ih.getInterfaceDuality();
|
||||
if ( gn.isActive() && dual.getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.YES )
|
||||
diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
|
||||
this.diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
|
||||
}
|
||||
|
||||
for (IGridNode gn : g.getMachines( PartInterface.class ))
|
||||
for (IGridNode gn : this.g.getMachines( PartInterface.class ))
|
||||
{
|
||||
IInterfaceHost ih = (IInterfaceHost) gn.getMachine();
|
||||
DualityInterface dual = ih.getInterfaceDuality();
|
||||
if ( gn.isActive() && dual.getConfigManager().getSetting( Settings.INTERFACE_TERMINAL ) == YesNo.YES )
|
||||
diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
|
||||
this.diList.put( ih, new InvTracker( dual, dual.getPatterns(), dual.getTermName() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data.setBoolean( "clear", true );
|
||||
|
||||
for (Entry<IInterfaceHost, InvTracker> en : diList.entrySet())
|
||||
for (Entry<IInterfaceHost, InvTracker> en : this.diList.entrySet())
|
||||
{
|
||||
InvTracker inv = en.getValue();
|
||||
byId.put( inv.which, inv );
|
||||
addItems( data, inv, 0, inv.server.getSizeInventory() );
|
||||
this.byId.put( inv.which, inv );
|
||||
this.addItems( data, inv, 0, inv.server.getSizeInventory() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,13 +50,13 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setTextField(GuiTextField level)
|
||||
{
|
||||
textField = level;
|
||||
textField.setText( String.valueOf( EmitterValue ) );
|
||||
this.textField = level;
|
||||
this.textField.setText( String.valueOf( this.EmitterValue ) );
|
||||
}
|
||||
|
||||
public ContainerLevelEmitter(InventoryPlayer ip, PartLevelEmitter te) {
|
||||
super( ip, te );
|
||||
lvlEmitter = te;
|
||||
this.lvlEmitter = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,8 +74,8 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
|
||||
public void setLevel(long l, EntityPlayer player)
|
||||
{
|
||||
lvlEmitter.setReportingValue( l );
|
||||
EmitterValue = l;
|
||||
this.lvlEmitter.setReportingValue( l );
|
||||
this.EmitterValue = l;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,18 +84,18 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
int x = 80 + 44;
|
||||
int y = 40;
|
||||
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
if ( availableUpgrades() > 0 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 1 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 2 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 3 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
if ( this.availableUpgrades() > 0 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 1 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 2 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 3 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer )).setNotDraggable() );
|
||||
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||
}
|
||||
|
||||
@GuiSync(2)
|
||||
@@ -110,18 +110,18 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.EmitterValue = lvlEmitter.getReportingValue();
|
||||
this.EmitterValue = this.lvlEmitter.getReportingValue();
|
||||
this.cmType = (YesNo) this.upgradeable.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
|
||||
this.lvType = (LevelType) this.upgradeable.getConfigManager().getSetting( Settings.LEVEL_TYPE );
|
||||
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,8 +129,8 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
{
|
||||
if ( field.equals( "EmitterValue" ) )
|
||||
{
|
||||
if ( textField != null )
|
||||
textField.setText( String.valueOf( EmitterValue ) );
|
||||
if ( this.textField != null )
|
||||
this.textField.setText( String.valueOf( this.EmitterValue ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
public ContainerMAC(InventoryPlayer ip, TileMolecularAssembler te)
|
||||
{
|
||||
super( ip, te );
|
||||
tma = te;
|
||||
this.tma = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,7 +72,7 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
|
||||
public boolean isValidItemForSlot(int slotIndex, ItemStack i)
|
||||
{
|
||||
IInventory mac = upgradeable.getInventoryByName( "mac" );
|
||||
IInventory mac = this.upgradeable.getInventoryByName( "mac" );
|
||||
|
||||
ItemStack is = mac.getStackInSlot( 10 );
|
||||
if ( is == null )
|
||||
@@ -96,56 +96,56 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
int offX = 29;
|
||||
int offY = 30;
|
||||
|
||||
IInventory mac = upgradeable.getInventoryByName( "mac" );
|
||||
IInventory mac = this.upgradeable.getInventoryByName( "mac" );
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
{
|
||||
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offX + x * 18, offY + y * 18 );
|
||||
addSlotToContainer( s );
|
||||
this.addSlotToContainer( s );
|
||||
}
|
||||
|
||||
offX = 126;
|
||||
offY = 16;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, invPlayer ) );
|
||||
addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, this.invPlayer ) );
|
||||
this.addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
|
||||
|
||||
offX = 122;
|
||||
offY = 17;
|
||||
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer ))
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer ))
|
||||
.setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer ))
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer ))
|
||||
.setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer ))
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer ))
|
||||
.setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer ))
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer ))
|
||||
.setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer ))
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.invPlayer ))
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
|
||||
}
|
||||
|
||||
craftProgress = this.tma.getCraftingProgress();
|
||||
this.craftProgress = this.tma.getCraftingProgress();
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return craftProgress;
|
||||
return this.craftProgress;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -88,66 +88,66 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
|
||||
public IGridNode getNetworkNode()
|
||||
{
|
||||
return networkNode;
|
||||
return this.networkNode;
|
||||
}
|
||||
|
||||
protected ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable, boolean bindInventory) {
|
||||
super( ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null, monitorable instanceof IPart ? (IPart) monitorable : null );
|
||||
|
||||
host = monitorable;
|
||||
clientCM = new ConfigManager( this );
|
||||
this.host = monitorable;
|
||||
this.clientCM = new ConfigManager( this );
|
||||
|
||||
clientCM.registerSetting( Settings.SORT_BY, SortOrder.NAME );
|
||||
clientCM.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
|
||||
clientCM.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
|
||||
this.clientCM.registerSetting( Settings.SORT_BY, SortOrder.NAME );
|
||||
this.clientCM.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
|
||||
this.clientCM.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
serverCM = monitorable.getConfigManager();
|
||||
this.serverCM = monitorable.getConfigManager();
|
||||
|
||||
monitor = monitorable.getItemInventory();
|
||||
if ( monitor != null )
|
||||
this.monitor = monitorable.getItemInventory();
|
||||
if ( this.monitor != null )
|
||||
{
|
||||
monitor.addListener( this, null );
|
||||
this.monitor.addListener( this, null );
|
||||
|
||||
cellInv = monitor;
|
||||
this.cellInv = this.monitor;
|
||||
|
||||
if ( monitorable instanceof IPortableCell )
|
||||
powerSrc = (IPortableCell) monitorable;
|
||||
this.powerSrc = (IPortableCell) monitorable;
|
||||
else if ( monitorable instanceof IMEChest )
|
||||
powerSrc = (IMEChest) monitorable;
|
||||
this.powerSrc = (IMEChest) monitorable;
|
||||
else if ( monitorable instanceof IGridHost )
|
||||
{
|
||||
IGridNode node = ((IGridHost) monitorable).getGridNode( ForgeDirection.UNKNOWN );
|
||||
if ( node != null )
|
||||
{
|
||||
networkNode = node;
|
||||
this.networkNode = node;
|
||||
IGrid g = node.getGrid();
|
||||
if ( g != null )
|
||||
powerSrc = new ChannelPowerSrc( networkNode, (IEnergyGrid) g.getCache( IEnergyGrid.class ) );
|
||||
this.powerSrc = new ChannelPowerSrc( this.networkNode, (IEnergyGrid) g.getCache( IEnergyGrid.class ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
monitor = null;
|
||||
this.monitor = null;
|
||||
|
||||
canAccessViewCells = false;
|
||||
this.canAccessViewCells = false;
|
||||
if ( monitorable instanceof IViewCellStorage )
|
||||
{
|
||||
for (int y = 0; y < 5; y++)
|
||||
{
|
||||
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
|
||||
invPlayer );
|
||||
cellView[y].allowEdit = canAccessViewCells;
|
||||
addSlotToContainer( cellView[y] );
|
||||
this.cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
|
||||
this.invPlayer );
|
||||
this.cellView[y].allowEdit = this.canAccessViewCells;
|
||||
this.addSlotToContainer( this.cellView[y] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( bindInventory )
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
}
|
||||
|
||||
public ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable) {
|
||||
@@ -159,17 +159,17 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
if ( monitor != host.getItemInventory() )
|
||||
isContainerValid = false;
|
||||
if ( this.monitor != this.host.getItemInventory() )
|
||||
this.isContainerValid = false;
|
||||
|
||||
for (Enum set : serverCM.getSettings())
|
||||
for (Enum set : this.serverCM.getSettings())
|
||||
{
|
||||
Enum sideLocal = serverCM.getSetting( set );
|
||||
Enum sideRemote = clientCM.getSetting( set );
|
||||
Enum sideLocal = this.serverCM.getSetting( set );
|
||||
Enum sideRemote = this.clientCM.getSetting( set );
|
||||
|
||||
if ( sideLocal != sideRemote )
|
||||
{
|
||||
clientCM.putSetting( set, sideLocal );
|
||||
this.clientCM.putSetting( set, sideLocal );
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
try
|
||||
@@ -184,15 +184,15 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
}
|
||||
}
|
||||
|
||||
if ( !items.isEmpty() )
|
||||
if ( !this.items.isEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
IItemList<IAEItemStack> monitorCache = monitor.getStorageList();
|
||||
IItemList<IAEItemStack> monitorCache = this.monitor.getStorageList();
|
||||
|
||||
PacketMEInventoryUpdate piu = new PacketMEInventoryUpdate();
|
||||
|
||||
for (IAEItemStack is : items)
|
||||
for (IAEItemStack is : this.items)
|
||||
{
|
||||
IAEItemStack send = monitorCache.findPrecise( is );
|
||||
if ( send == null )
|
||||
@@ -206,7 +206,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
|
||||
if ( !piu.isEmpty() )
|
||||
{
|
||||
items.resetStatus();
|
||||
this.items.resetStatus();
|
||||
|
||||
for (Object c : this.crafters)
|
||||
{
|
||||
@@ -221,16 +221,16 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
}
|
||||
}
|
||||
|
||||
updatePowerStatus();
|
||||
this.updatePowerStatus();
|
||||
|
||||
boolean oldCanAccessViewCells = canAccessViewCells;
|
||||
canAccessViewCells = hasAccess( SecurityPermissions.BUILD, false );
|
||||
if ( canAccessViewCells != oldCanAccessViewCells )
|
||||
boolean oldCanAccessViewCells = this.canAccessViewCells;
|
||||
this.canAccessViewCells = this.hasAccess( SecurityPermissions.BUILD, false );
|
||||
if ( this.canAccessViewCells != oldCanAccessViewCells )
|
||||
{
|
||||
for (int y = 0; y < 5; y++)
|
||||
{
|
||||
if ( cellView[y] != null )
|
||||
cellView[y].allowEdit = canAccessViewCells;
|
||||
if ( this.cellView[y] != null )
|
||||
this.cellView[y].allowEdit = this.canAccessViewCells;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,12 +242,12 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( networkNode != null )
|
||||
hasPower = networkNode.isActive();
|
||||
else if ( powerSrc instanceof IEnergyGrid )
|
||||
hasPower = ((IEnergyGrid) powerSrc).isNetworkPowered();
|
||||
if ( this.networkNode != null )
|
||||
this.hasPower = this.networkNode.isActive();
|
||||
else if ( this.powerSrc instanceof IEnergyGrid )
|
||||
this.hasPower = ((IEnergyGrid) this.powerSrc).isNetworkPowered();
|
||||
else
|
||||
hasPower = powerSrc.extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.8;
|
||||
this.hasPower = this.powerSrc.extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.8;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -259,17 +259,17 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
public void addCraftingToCrafters(ICrafting c)
|
||||
{
|
||||
super.addCraftingToCrafters( c );
|
||||
queueInventory( c );
|
||||
this.queueInventory( c );
|
||||
}
|
||||
|
||||
public void queueInventory(ICrafting c)
|
||||
{
|
||||
if ( Platform.isServer() && c instanceof EntityPlayer && monitor != null )
|
||||
if ( Platform.isServer() && c instanceof EntityPlayer && this.monitor != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketMEInventoryUpdate piu = new PacketMEInventoryUpdate();
|
||||
IItemList<IAEItemStack> monitorCache = monitor.getStorageList();
|
||||
IItemList<IAEItemStack> monitorCache = this.monitor.getStorageList();
|
||||
|
||||
for (IAEItemStack send : monitorCache)
|
||||
{
|
||||
@@ -304,7 +304,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
if ( c instanceof ICrafting )
|
||||
{
|
||||
ICrafting cr = (ICrafting) c;
|
||||
queueInventory( cr );
|
||||
this.queueInventory( cr );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,8 +315,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
if ( field.equals( "canAccessViewCells" ) )
|
||||
{
|
||||
for (int y = 0; y < 5; y++)
|
||||
if ( cellView[y] != null )
|
||||
cellView[y].allowEdit = canAccessViewCells;
|
||||
if ( this.cellView[y] != null )
|
||||
this.cellView[y].allowEdit = this.canAccessViewCells;
|
||||
}
|
||||
|
||||
super.onUpdate( field, oldValue, newValue );
|
||||
@@ -326,8 +326,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
public void onContainerClosed(EntityPlayer player)
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
if ( monitor != null )
|
||||
monitor.removeListener( this );
|
||||
if ( this.monitor != null )
|
||||
this.monitor.removeListener( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -335,15 +335,15 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
|
||||
if ( this.crafters.isEmpty() && monitor != null )
|
||||
monitor.removeListener( this );
|
||||
if ( this.crafters.isEmpty() && this.monitor != null )
|
||||
this.monitor.removeListener( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postChange(IBaseMonitor<IAEItemStack> monitor, Iterable<IAEItemStack> change, BaseActionSource source)
|
||||
{
|
||||
for (IAEItemStack is : change)
|
||||
items.add( is );
|
||||
this.items.add( is );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -355,24 +355,24 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
@Override
|
||||
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
|
||||
{
|
||||
if ( gui != null )
|
||||
gui.updateSetting( manager, settingName, newValue );
|
||||
if ( this.gui != null )
|
||||
this.gui.updateSetting( manager, settingName, newValue );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigManager getConfigManager()
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
return serverCM;
|
||||
return clientCM;
|
||||
return this.serverCM;
|
||||
return this.clientCM;
|
||||
}
|
||||
|
||||
public ItemStack[] getViewCells()
|
||||
{
|
||||
ItemStack[] list = new ItemStack[cellView.length];
|
||||
ItemStack[] list = new ItemStack[this.cellView.length];
|
||||
|
||||
for (int x = 0; x < cellView.length; x++)
|
||||
list[x] = cellView[x].getStack();
|
||||
for (int x = 0; x < this.cellView.length; x++)
|
||||
list[x] = this.cellView[x].getStack();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
|
||||
public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) {
|
||||
super( ip, monitorable, false );
|
||||
lockPlayerInventorySlot( ip.currentItem );
|
||||
civ = monitorable;
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
this.lockPlayerInventorySlot( ip.currentItem );
|
||||
this.civ = monitorable;
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
}
|
||||
|
||||
int ticks = 0;
|
||||
@@ -43,32 +43,32 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
ItemStack currentItem = getPlayerInv().getCurrentItem();
|
||||
ItemStack currentItem = this.getPlayerInv().getCurrentItem();
|
||||
|
||||
if ( civ != null )
|
||||
if ( this.civ != null )
|
||||
{
|
||||
if ( currentItem != civ.getItemStack() )
|
||||
if ( currentItem != this.civ.getItemStack() )
|
||||
{
|
||||
if ( currentItem != null )
|
||||
{
|
||||
if ( Platform.isSameItem( civ.getItemStack(), currentItem ) )
|
||||
getPlayerInv().setInventorySlotContents( getPlayerInv().currentItem, civ.getItemStack() );
|
||||
if ( Platform.isSameItem( this.civ.getItemStack(), currentItem ) )
|
||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.civ.getItemStack() );
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
|
||||
// drain 1 ae t
|
||||
ticks++;
|
||||
if ( ticks > 10 )
|
||||
this.ticks++;
|
||||
if ( this.ticks > 10 )
|
||||
{
|
||||
civ.extractAEPower( powerMultiplier * ticks, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
ticks = 0;
|
||||
this.civ.extractAEPower( this.powerMultiplier * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
this.ticks = 0;
|
||||
}
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
@@ -52,22 +52,22 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
|
||||
if ( host != null )
|
||||
{
|
||||
findNode( host, ForgeDirection.UNKNOWN );
|
||||
this.findNode( host, ForgeDirection.UNKNOWN );
|
||||
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
|
||||
findNode( host, d );
|
||||
this.findNode( host, d );
|
||||
}
|
||||
|
||||
if ( network == null && Platform.isServer() )
|
||||
isContainerValid = false;
|
||||
if ( this.network == null && Platform.isServer() )
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
|
||||
private void findNode(IGridHost host, ForgeDirection d)
|
||||
{
|
||||
if ( network == null )
|
||||
if ( this.network == null )
|
||||
{
|
||||
IGridNode node = host.getGridNode( d );
|
||||
if ( node != null )
|
||||
network = node.getGrid();
|
||||
this.network = node.getGrid();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,18 +85,18 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
delay++;
|
||||
if ( Platform.isServer() && delay > 15 && network != null )
|
||||
this.delay++;
|
||||
if ( Platform.isServer() && this.delay > 15 && this.network != null )
|
||||
{
|
||||
delay = 0;
|
||||
this.delay = 0;
|
||||
|
||||
IEnergyGrid eg = network.getCache( IEnergyGrid.class );
|
||||
IEnergyGrid eg = this.network.getCache( IEnergyGrid.class );
|
||||
if ( eg != null )
|
||||
{
|
||||
avgAddition = (long) (100.0 * eg.getAvgPowerInjection());
|
||||
powerUsage = (long) (100.0 * eg.getAvgPowerUsage());
|
||||
currentPower = (long) (100.0 * eg.getStoredPower());
|
||||
maxPower = (long) (100.0 * eg.getMaxStoredPower());
|
||||
this.avgAddition = (long) (100.0 * eg.getAvgPowerInjection());
|
||||
this.powerUsage = (long) (100.0 * eg.getAvgPowerUsage());
|
||||
this.currentPower = (long) (100.0 * eg.getStoredPower());
|
||||
this.maxPower = (long) (100.0 * eg.getMaxStoredPower());
|
||||
}
|
||||
|
||||
PacketMEInventoryUpdate piu;
|
||||
@@ -104,10 +104,10 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
{
|
||||
piu = new PacketMEInventoryUpdate();
|
||||
|
||||
for (Class<? extends IGridHost> machineClass : network.getMachinesClasses())
|
||||
for (Class<? extends IGridHost> machineClass : this.network.getMachinesClasses())
|
||||
{
|
||||
IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
|
||||
for (IGridNode machine : network.getMachines( machineClass ))
|
||||
for (IGridNode machine : this.network.getMachines( machineClass ))
|
||||
{
|
||||
IGridBlock blk = machine.getGridBlock();
|
||||
ItemStack is = blk.getMachineRepresentation();
|
||||
|
||||
@@ -37,20 +37,20 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
|
||||
public ContainerNetworkTool(InventoryPlayer ip, INetworkTool te) {
|
||||
super( ip, null, null );
|
||||
toolInv = te;
|
||||
this.toolInv = te;
|
||||
|
||||
lockPlayerInventorySlot( ip.currentItem );
|
||||
this.lockPlayerInventorySlot( ip.currentItem );
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te, y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, invPlayer )) );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te, y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, this.invPlayer )) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
public void toggleFacadeMode()
|
||||
{
|
||||
NBTTagCompound data = Platform.openNbtData( toolInv.getItemStack() );
|
||||
NBTTagCompound data = Platform.openNbtData( this.toolInv.getItemStack() );
|
||||
data.setBoolean( "hideFacades", !data.getBoolean( "hideFacades" ) );
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
@@ -58,27 +58,27 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
ItemStack currentItem = getPlayerInv().getCurrentItem();
|
||||
ItemStack currentItem = this.getPlayerInv().getCurrentItem();
|
||||
|
||||
if ( currentItem != toolInv.getItemStack() )
|
||||
if ( currentItem != this.toolInv.getItemStack() )
|
||||
{
|
||||
if ( currentItem != null )
|
||||
{
|
||||
if ( Platform.isSameItem( toolInv.getItemStack(), currentItem ) )
|
||||
if ( Platform.isSameItem( this.toolInv.getItemStack(), currentItem ) )
|
||||
{
|
||||
getPlayerInv().setInventorySlotContents( getPlayerInv().currentItem, toolInv.getItemStack() );
|
||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
|
||||
if ( isContainerValid )
|
||||
if ( this.isContainerValid )
|
||||
{
|
||||
NBTTagCompound data = Platform.openNbtData( currentItem );
|
||||
facadeMode = data.getBoolean( "hideFacades" );
|
||||
this.facadeMode = data.getBoolean( "hideFacades" );
|
||||
}
|
||||
|
||||
super.detectAndSendChanges();
|
||||
|
||||
@@ -82,50 +82,50 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
public ContainerPatternTerm(InventoryPlayer ip, ITerminalHost monitorable)
|
||||
{
|
||||
super( ip, monitorable, false );
|
||||
ct = (PartPatternTerminal) monitorable;
|
||||
this.ct = (PartPatternTerminal) monitorable;
|
||||
|
||||
IInventory patternInv = ct.getInventoryByName( "pattern" );
|
||||
IInventory output = ct.getInventoryByName( "output" );
|
||||
crafting = ct.getInventoryByName( "crafting" );
|
||||
IInventory patternInv = this.ct.getInventoryByName( "pattern" );
|
||||
IInventory output = this.ct.getInventoryByName( "output" );
|
||||
this.crafting = this.ct.getInventoryByName( "crafting" );
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
for (int x = 0; x < 3; x++)
|
||||
addSlotToContainer( craftingSlots[x + y * 3] = new SlotFakeCraftingMatrix( crafting, x + y * 3, 18 + x * 18, -76 + y * 18 ) );
|
||||
this.addSlotToContainer( this.craftingSlots[x + y * 3] = new SlotFakeCraftingMatrix( this.crafting, x + y * 3, 18 + x * 18, -76 + y * 18 ) );
|
||||
|
||||
addSlotToContainer( craftSlot = new SlotPatternTerm( ip.player, mySrc, powerSrc, monitorable, crafting, patternInv, cOut, 110, -76 + 18, this, 2, this ) );
|
||||
craftSlot.IIcon = -1;
|
||||
this.addSlotToContainer( this.craftSlot = new SlotPatternTerm( ip.player, this.mySrc, this.powerSrc, monitorable, this.crafting, patternInv, this.cOut, 110, -76 + 18, this, 2, this ) );
|
||||
this.craftSlot.IIcon = -1;
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
{
|
||||
addSlotToContainer( outputSlots[y] = new SlotPatternOutputs( output, this, y, 110, -76 + y * 18, 0, 0, 1 ) );
|
||||
outputSlots[y].renderDisabled = false;
|
||||
outputSlots[y].IIcon = -1;
|
||||
this.addSlotToContainer( this.outputSlots[y] = new SlotPatternOutputs( output, this, y, 110, -76 + y * 18, 0, 0, 1 ) );
|
||||
this.outputSlots[y].renderDisabled = false;
|
||||
this.outputSlots[y].IIcon = -1;
|
||||
}
|
||||
|
||||
addSlotToContainer( patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, invPlayer ) );
|
||||
addSlotToContainer( patternSlotOUT = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, patternInv, 1, 147, -72 + 34, invPlayer ) );
|
||||
this.addSlotToContainer( this.patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, this.invPlayer ) );
|
||||
this.addSlotToContainer( this.patternSlotOUT = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, patternInv, 1, 147, -72 + 34, this.invPlayer ) );
|
||||
|
||||
patternSlotOUT.setStackLimit( 1 );
|
||||
this.patternSlotOUT.setStackLimit( 1 );
|
||||
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
updateOrderOfOutputSlots();
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
this.updateOrderOfOutputSlots();
|
||||
}
|
||||
|
||||
private void updateOrderOfOutputSlots()
|
||||
{
|
||||
if ( !craftingMode )
|
||||
if ( !this.craftingMode )
|
||||
{
|
||||
craftSlot.xDisplayPosition = -9000;
|
||||
this.craftSlot.xDisplayPosition = -9000;
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
outputSlots[y].xDisplayPosition = outputSlots[y].defX;
|
||||
this.outputSlots[y].xDisplayPosition = this.outputSlots[y].defX;
|
||||
}
|
||||
else
|
||||
{
|
||||
craftSlot.xDisplayPosition = craftSlot.defX;
|
||||
this.craftSlot.xDisplayPosition = this.craftSlot.defX;
|
||||
|
||||
for (int y = 0; y < 3; y++)
|
||||
outputSlots[y].xDisplayPosition = -9000;
|
||||
this.outputSlots[y].xDisplayPosition = -9000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,24 +133,24 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
public void putStackInSlot(int par1, ItemStack par2ItemStack)
|
||||
{
|
||||
super.putStackInSlot( par1, par2ItemStack );
|
||||
getAndUpdateOutput();
|
||||
this.getAndUpdateOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack)
|
||||
{
|
||||
super.putStacksInSlots( par1ArrayOfItemStack );
|
||||
getAndUpdateOutput();
|
||||
this.getAndUpdateOutput();
|
||||
}
|
||||
|
||||
public ItemStack getAndUpdateOutput()
|
||||
{
|
||||
InventoryCrafting ic = new InventoryCrafting( this, 3, 3 );
|
||||
for (int x = 0; x < ic.getSizeInventory(); x++)
|
||||
ic.setInventorySlotContents( x, crafting.getStackInSlot( x ) );
|
||||
ic.setInventorySlotContents( x, this.crafting.getStackInSlot( x ) );
|
||||
|
||||
ItemStack is = CraftingManager.getInstance().findMatchingRecipe( ic, this.getPlayerInv().player.worldObj );
|
||||
cOut.setInventorySlotContents( 0, is );
|
||||
this.cOut.setInventorySlotContents( 0, is );
|
||||
return is;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
super.detectAndSendChanges();
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
if ( craftingMode != ct.isCraftingRecipe() )
|
||||
if ( this.craftingMode != this.ct.isCraftingRecipe() )
|
||||
{
|
||||
craftingMode = ct.isCraftingRecipe();
|
||||
updateOrderOfOutputSlots();
|
||||
this.craftingMode = this.ct.isCraftingRecipe();
|
||||
this.updateOrderOfOutputSlots();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,8 +178,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
if ( field.equals( "craftingMode" ) )
|
||||
{
|
||||
getAndUpdateOutput();
|
||||
updateOrderOfOutputSlots();
|
||||
this.getAndUpdateOutput();
|
||||
this.updateOrderOfOutputSlots();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,33 +191,33 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
public void encode()
|
||||
{
|
||||
ItemStack output = patternSlotOUT.getStack();
|
||||
ItemStack output = this.patternSlotOUT.getStack();
|
||||
|
||||
ItemStack[] in = getInputs();
|
||||
ItemStack[] out = getOutputs();
|
||||
ItemStack[] in = this.getInputs();
|
||||
ItemStack[] out = this.getOutputs();
|
||||
|
||||
// if there is no input, this would be silly.
|
||||
if ( in == null || out == null )
|
||||
return;
|
||||
|
||||
// first check the output slots, should either be null, or a pattern
|
||||
if ( output != null && !isPattern( output ) )
|
||||
if ( output != null && !this.isPattern( output ) )
|
||||
return;
|
||||
|
||||
// if nothing is there we should snag a new pattern.
|
||||
else if ( output == null )
|
||||
{
|
||||
output = patternSlotIN.getStack();
|
||||
if ( output == null || !isPattern( output ) )
|
||||
output = this.patternSlotIN.getStack();
|
||||
if ( output == null || !this.isPattern( output ) )
|
||||
return; // no blanks.
|
||||
|
||||
// remove one, and clear the input slot.
|
||||
output.stackSize--;
|
||||
if ( output.stackSize == 0 )
|
||||
patternSlotIN.putStack( null );
|
||||
this.patternSlotIN.putStack( null );
|
||||
|
||||
// add a new encoded pattern.
|
||||
patternSlotOUT.putStack( output = AEApi.instance().items().itemEncodedPattern.stack( 1 ) );
|
||||
this.patternSlotOUT.putStack( output = AEApi.instance().items().itemEncodedPattern.stack( 1 ) );
|
||||
}
|
||||
|
||||
// encode the slot.
|
||||
@@ -227,14 +227,14 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
NBTTagList tagOut = new NBTTagList();
|
||||
|
||||
for (ItemStack i : in)
|
||||
tagIn.appendTag( createItemTag( i ) );
|
||||
tagIn.appendTag( this.createItemTag( i ) );
|
||||
|
||||
for (ItemStack i : out)
|
||||
tagOut.appendTag( createItemTag( i ) );
|
||||
tagOut.appendTag( this.createItemTag( i ) );
|
||||
|
||||
encodedValue.setTag( "in", tagIn );
|
||||
encodedValue.setTag( "out", tagOut );
|
||||
encodedValue.setBoolean( "crafting", craftingMode );
|
||||
encodedValue.setBoolean( "crafting", this.craftingMode );
|
||||
|
||||
output.setTagCompound( encodedValue );
|
||||
}
|
||||
@@ -254,9 +254,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
ItemStack[] input = new ItemStack[9];
|
||||
boolean hasValue = false;
|
||||
|
||||
for (int x = 0; x < craftingSlots.length; x++)
|
||||
for (int x = 0; x < this.craftingSlots.length; x++)
|
||||
{
|
||||
input[x] = craftingSlots[x].getStack();
|
||||
input[x] = this.craftingSlots[x].getStack();
|
||||
if ( input[x] != null )
|
||||
hasValue = true;
|
||||
}
|
||||
@@ -269,9 +269,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
private ItemStack[] getOutputs()
|
||||
{
|
||||
if ( craftingMode )
|
||||
if ( this.craftingMode )
|
||||
{
|
||||
ItemStack out = getAndUpdateOutput();
|
||||
ItemStack out = this.getAndUpdateOutput();
|
||||
if ( out != null && out.stackSize > 0 )
|
||||
return new ItemStack[] { out };
|
||||
}
|
||||
@@ -280,7 +280,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
List<ItemStack> list = new ArrayList<ItemStack>( 3 );
|
||||
boolean hasValue = false;
|
||||
|
||||
for (OptionalSlotFake outputSlot : outputSlots)
|
||||
for (OptionalSlotFake outputSlot : this.outputSlots)
|
||||
{
|
||||
ItemStack out = outputSlot.getStack();
|
||||
if ( out != null && out.stackSize > 0 )
|
||||
@@ -309,9 +309,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
if ( idx == 1 )
|
||||
return Platform.isServer() ? !ct.isCraftingRecipe() : !craftingMode;
|
||||
return Platform.isServer() ? !this.ct.isCraftingRecipe() : !this.craftingMode;
|
||||
else if ( idx == 2 )
|
||||
return Platform.isServer() ? ct.isCraftingRecipe() : craftingMode;
|
||||
return Platform.isServer() ? this.ct.isCraftingRecipe() : this.craftingMode;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -324,27 +324,27 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
public void craftOrGetItem(PacketPatternSlot packetPatternSlot)
|
||||
{
|
||||
if ( packetPatternSlot.slotItem != null && cellInv != null )
|
||||
if ( packetPatternSlot.slotItem != null && this.cellInv != null )
|
||||
{
|
||||
IAEItemStack out = packetPatternSlot.slotItem.copy();
|
||||
|
||||
InventoryAdaptor inv = new AdaptorPlayerHand( getPlayerInv().player );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( getPlayerInv().player, ForgeDirection.UNKNOWN );
|
||||
InventoryAdaptor inv = new AdaptorPlayerHand( this.getPlayerInv().player );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( this.getPlayerInv().player, ForgeDirection.UNKNOWN );
|
||||
if ( packetPatternSlot.shift )
|
||||
inv = playerInv;
|
||||
|
||||
if ( inv.simulateAdd( out.getItemStack() ) != null )
|
||||
return;
|
||||
|
||||
IAEItemStack extracted = Platform.poweredExtraction( powerSrc, cellInv, out, mySrc );
|
||||
EntityPlayer p = getPlayerInv().player;
|
||||
IAEItemStack extracted = Platform.poweredExtraction( this.powerSrc, this.cellInv, out, this.mySrc );
|
||||
EntityPlayer p = this.getPlayerInv().player;
|
||||
|
||||
if ( extracted != null )
|
||||
{
|
||||
inv.addItems( extracted.getItemStack() );
|
||||
if ( p instanceof EntityPlayerMP )
|
||||
updateHeld( (EntityPlayerMP) p );
|
||||
detectAndSendChanges();
|
||||
this.updateHeld( (EntityPlayerMP) p );
|
||||
this.detectAndSendChanges();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
if ( r == null )
|
||||
return;
|
||||
|
||||
IMEMonitor<IAEItemStack> storage = ct.getItemInventory();
|
||||
IMEMonitor<IAEItemStack> storage = this.ct.getItemInventory();
|
||||
IItemList<IAEItemStack> all = storage.getStorageList();
|
||||
|
||||
ItemStack is = r.getCraftingResult( ic );
|
||||
@@ -369,8 +369,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
{
|
||||
if ( ic.getStackInSlot( x ) != null )
|
||||
{
|
||||
ItemStack pulled = Platform.extractItemsByRecipe( powerSrc, mySrc, storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all,
|
||||
Actionable.MODULATE, ItemViewCell.createFilter( getViewCells() ) );
|
||||
ItemStack pulled = Platform.extractItemsByRecipe( this.powerSrc, this.mySrc, storage, p.worldObj, r, is, ic, ic.getStackInSlot( x ), x, all,
|
||||
Actionable.MODULATE, ItemViewCell.createFilter( this.getViewCells() ) );
|
||||
real.setInventorySlotContents( x, pulled );
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
if ( rr == r && Platform.isSameItemPrecise( rr.getCraftingResult( real ), is ) )
|
||||
{
|
||||
SlotCrafting sc = new SlotCrafting( p, real, cOut, 0, 0, 0 );
|
||||
SlotCrafting sc = new SlotCrafting( p, real, this.cOut, 0, 0, 0 );
|
||||
sc.onPickupFromSlot( p, is );
|
||||
|
||||
for (int x = 0; x < real.getSizeInventory(); x++)
|
||||
@@ -391,8 +391,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
inv.addItems( is );
|
||||
if ( p instanceof EntityPlayerMP )
|
||||
updateHeld( (EntityPlayerMP) p );
|
||||
detectAndSendChanges();
|
||||
this.updateHeld( (EntityPlayerMP) p );
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -401,7 +401,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
ItemStack failed = real.getStackInSlot( x );
|
||||
if ( failed != null )
|
||||
{
|
||||
cellInv.injectItems( AEItemStack.create( failed ), Actionable.MODULATE, new MachineSource( ct ) );
|
||||
this.cellInv.injectItems( AEItemStack.create( failed ), Actionable.MODULATE, new MachineSource( this.ct ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,13 +412,13 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
@Override
|
||||
public void onSlotChange(Slot s)
|
||||
{
|
||||
if ( s == patternSlotOUT && Platform.isServer() )
|
||||
if ( s == this.patternSlotOUT && Platform.isServer() )
|
||||
{
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting) crafter;
|
||||
|
||||
for (Object g : inventorySlots)
|
||||
for (Object g : this.inventorySlots)
|
||||
{
|
||||
if ( g instanceof OptionalSlotFake || g instanceof SlotFakeCraftingMatrix )
|
||||
{
|
||||
@@ -428,20 +428,20 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
((EntityPlayerMP) icrafting).isChangingQuantityOnly = false;
|
||||
}
|
||||
detectAndSendChanges();
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
for (Slot s : craftingSlots)
|
||||
for (Slot s : this.craftingSlots)
|
||||
s.putStack( null );
|
||||
|
||||
for (Slot s : outputSlots)
|
||||
for (Slot s : this.outputSlots)
|
||||
s.putStack( null );
|
||||
|
||||
detectAndSendChanges();
|
||||
getAndUpdateOutput();
|
||||
this.detectAndSendChanges();
|
||||
this.getAndUpdateOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -449,9 +449,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
{
|
||||
if (name.equals("player"))
|
||||
{
|
||||
return invPlayer;
|
||||
return this.invPlayer;
|
||||
}
|
||||
return ct.getInventoryByName( name );
|
||||
return this.ct.getInventoryByName( name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,13 +45,13 @@ public class ContainerPriority extends AEBaseContainer
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setTextField(GuiTextField level)
|
||||
{
|
||||
textField = level;
|
||||
textField.setText( String.valueOf( PriorityValue ) );
|
||||
this.textField = level;
|
||||
this.textField.setText( String.valueOf( this.PriorityValue ) );
|
||||
}
|
||||
|
||||
public ContainerPriority(InventoryPlayer ip, IPriorityHost te) {
|
||||
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
|
||||
priHost = te;
|
||||
this.priHost = te;
|
||||
}
|
||||
|
||||
@GuiSync(2)
|
||||
@@ -59,19 +59,19 @@ public class ContainerPriority extends AEBaseContainer
|
||||
|
||||
public void setPriority(int newValue, EntityPlayer player)
|
||||
{
|
||||
priHost.setPriority( newValue );
|
||||
PriorityValue = newValue;
|
||||
this.priHost.setPriority( newValue );
|
||||
this.PriorityValue = newValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.PriorityValue = priHost.getPriority();
|
||||
this.PriorityValue = this.priHost.getPriority();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ public class ContainerPriority extends AEBaseContainer
|
||||
{
|
||||
if ( field.equals( "PriorityValue" ) )
|
||||
{
|
||||
if ( textField != null )
|
||||
textField.setText( String.valueOf( PriorityValue ) );
|
||||
if ( this.textField != null )
|
||||
this.textField.setText( String.valueOf( this.PriorityValue ) );
|
||||
}
|
||||
|
||||
super.onUpdate( field, oldValue, newValue );
|
||||
|
||||
@@ -32,9 +32,9 @@ public class ContainerQNB extends AEBaseContainer
|
||||
super( ip, quantumBridge, null );
|
||||
this.quantumBridge = quantumBridge;
|
||||
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, this.invPlayer )).setStackLimit( 1 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,37 +47,37 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
|
||||
public void setName(String value)
|
||||
{
|
||||
myName = value;
|
||||
this.myName = value;
|
||||
}
|
||||
|
||||
public ContainerQuartzKnife(InventoryPlayer ip, QuartzKnifeObj te) {
|
||||
super( ip, null, null );
|
||||
toolInv = te;
|
||||
this.toolInv = te;
|
||||
|
||||
addSlotToContainer( metals = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.METAL_INGOTS, inSlot, 0, 94, 44, ip ) );
|
||||
addSlotToContainer( output = new QuartzKnifeOutput( this, 0, 134, 44, -1 ) );
|
||||
this.addSlotToContainer( this.metals = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.METAL_INGOTS, this.inSlot, 0, 94, 44, ip ) );
|
||||
this.addSlotToContainer( this.output = new QuartzKnifeOutput( this, 0, 134, 44, -1 ) );
|
||||
|
||||
lockPlayerInventorySlot( ip.currentItem );
|
||||
this.lockPlayerInventorySlot( ip.currentItem );
|
||||
|
||||
bindPlayerInventory( ip, 0, 184 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 184 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
ItemStack currentItem = getPlayerInv().getCurrentItem();
|
||||
ItemStack currentItem = this.getPlayerInv().getCurrentItem();
|
||||
|
||||
if ( currentItem != toolInv.getItemStack() )
|
||||
if ( currentItem != this.toolInv.getItemStack() )
|
||||
{
|
||||
if ( currentItem != null )
|
||||
{
|
||||
if ( Platform.isSameItem( toolInv.getItemStack(), currentItem ) )
|
||||
getPlayerInv().setInventorySlotContents( getPlayerInv().currentItem, toolInv.getItemStack() );
|
||||
if ( Platform.isSameItem( this.toolInv.getItemStack(), currentItem ) )
|
||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
|
||||
super.detectAndSendChanges();
|
||||
@@ -86,8 +86,8 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer par1EntityPlayer)
|
||||
{
|
||||
if ( inSlot.getStackInSlot( 0 ) != null )
|
||||
par1EntityPlayer.dropPlayerItemWithRandomChoice( inSlot.getStackInSlot( 0 ), false );
|
||||
if ( this.inSlot.getStackInSlot( 0 ) != null )
|
||||
par1EntityPlayer.dropPlayerItemWithRandomChoice( this.inSlot.getStackInSlot( 0 ), false );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,17 +111,17 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int var1)
|
||||
{
|
||||
ItemStack input = inSlot.getStackInSlot( 0 );
|
||||
ItemStack input = this.inSlot.getStackInSlot( 0 );
|
||||
if ( input == null )
|
||||
return null;
|
||||
|
||||
if ( SlotRestrictedInput.isMetalIngot( input ) )
|
||||
{
|
||||
if ( myName.length() > 0 )
|
||||
if ( this.myName.length() > 0 )
|
||||
{
|
||||
ItemStack name = AEApi.instance().materials().materialNamePress.stack( 1 );
|
||||
NBTTagCompound c = Platform.openNbtData( name );
|
||||
c.setString( "InscribeName", myName );
|
||||
c.setString( "InscribeName", this.myName );
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -132,10 +132,10 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
@Override
|
||||
public ItemStack decrStackSize(int var1, int var2)
|
||||
{
|
||||
ItemStack is = getStackInSlot( 0 );
|
||||
ItemStack is = this.getStackInSlot( 0 );
|
||||
if ( is != null )
|
||||
{
|
||||
if ( makePlate() )
|
||||
if ( this.makePlate() )
|
||||
return is;
|
||||
}
|
||||
return null;
|
||||
@@ -143,15 +143,15 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
|
||||
private boolean makePlate()
|
||||
{
|
||||
if ( inSlot.decrStackSize( 0, 1 ) != null )
|
||||
if ( this.inSlot.decrStackSize( 0, 1 ) != null )
|
||||
{
|
||||
ItemStack item = toolInv.getItemStack();
|
||||
item.damageItem( 1, getPlayerInv().player );
|
||||
ItemStack item = this.toolInv.getItemStack();
|
||||
item.damageItem( 1, this.getPlayerInv().player );
|
||||
|
||||
if ( item.stackSize == 0 )
|
||||
{
|
||||
getPlayerInv().mainInventory[getPlayerInv().currentItem] = null;
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( getPlayerInv().player, item ) );
|
||||
this.getPlayerInv().mainInventory[this.getPlayerInv().currentItem] = null;
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( this.getPlayerInv().player, item ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -169,7 +169,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
public void setInventorySlotContents(int var1, ItemStack var2)
|
||||
{
|
||||
if ( var2 == null && Platform.isServer() )
|
||||
makePlate();
|
||||
this.makePlate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,14 +54,14 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
public ContainerSecurity(InventoryPlayer ip, ITerminalHost monitorable) {
|
||||
super( ip, monitorable, false );
|
||||
|
||||
securityBox = (TileSecurity) monitorable;
|
||||
this.securityBox = (TileSecurity) monitorable;
|
||||
|
||||
addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
|
||||
this.addSlotToContainer( this.configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, this.securityBox.configSlot, 0, 37, -33, ip ) );
|
||||
|
||||
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
|
||||
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
|
||||
this.addSlotToContainer( this.wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, this.wirelessEncoder, 0, 212, 10, ip ) );
|
||||
this.addSlotToContainer( this.wirelessOut = new SlotOutput( this.wirelessEncoder, 1, 212, 68, -1 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
}
|
||||
|
||||
@GuiSync(0)
|
||||
@@ -72,11 +72,11 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
|
||||
if ( wirelessIn.getHasStack() )
|
||||
player.dropPlayerItemWithRandomChoice( wirelessIn.getStack(), false );
|
||||
if ( this.wirelessIn.getHasStack() )
|
||||
player.dropPlayerItemWithRandomChoice( this.wirelessIn.getStack(), false );
|
||||
|
||||
if ( wirelessOut.getHasStack() )
|
||||
player.dropPlayerItemWithRandomChoice( wirelessOut.getStack(), false );
|
||||
if ( this.wirelessOut.getHasStack() )
|
||||
player.dropPlayerItemWithRandomChoice( this.wirelessOut.getStack(), false );
|
||||
}
|
||||
|
||||
public void toggleSetting(String value, EntityPlayer player)
|
||||
@@ -85,7 +85,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
{
|
||||
SecurityPermissions permission = SecurityPermissions.valueOf( value );
|
||||
|
||||
ItemStack a = configSlot.getStack();
|
||||
ItemStack a = this.configSlot.getStack();
|
||||
if ( a != null && a.getItem() instanceof IBiometricCard )
|
||||
{
|
||||
IBiometricCard bc = (IBiometricCard) a.getItem();
|
||||
@@ -104,20 +104,20 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.SECURITY, false );
|
||||
this.verifyPermissions( SecurityPermissions.SECURITY, false );
|
||||
|
||||
security = 0;
|
||||
this.security = 0;
|
||||
|
||||
ItemStack a = configSlot.getStack();
|
||||
ItemStack a = this.configSlot.getStack();
|
||||
if ( a != null && a.getItem() instanceof IBiometricCard )
|
||||
{
|
||||
IBiometricCard bc = (IBiometricCard) a.getItem();
|
||||
|
||||
for (SecurityPermissions sp : bc.getPermissions( a ))
|
||||
security = security | (1 << sp.ordinal());
|
||||
this.security = this.security | (1 << sp.ordinal());
|
||||
}
|
||||
|
||||
updatePowerStatus();
|
||||
this.updatePowerStatus();
|
||||
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
@@ -131,11 +131,11 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
@Override
|
||||
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack)
|
||||
{
|
||||
if ( !wirelessOut.getHasStack() )
|
||||
if ( !this.wirelessOut.getHasStack() )
|
||||
{
|
||||
if ( wirelessIn.getHasStack() )
|
||||
if ( this.wirelessIn.getHasStack() )
|
||||
{
|
||||
ItemStack term = wirelessIn.getStack().copy();
|
||||
ItemStack term = this.wirelessIn.getStack().copy();
|
||||
INetworkEncodable networkEncodable = null;
|
||||
|
||||
if ( term.getItem() instanceof INetworkEncodable )
|
||||
@@ -147,17 +147,17 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
||||
|
||||
if ( networkEncodable != null )
|
||||
{
|
||||
networkEncodable.setEncryptionKey( term, String.valueOf( securityBox.securityKey ), "" );
|
||||
networkEncodable.setEncryptionKey( term, String.valueOf( this.securityBox.securityKey ), "" );
|
||||
|
||||
wirelessIn.putStack( null );
|
||||
wirelessOut.putStack( term );
|
||||
this.wirelessIn.putStack( null );
|
||||
this.wirelessOut.putStack( term );
|
||||
|
||||
// update the two slots in question...
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting) crafter;
|
||||
icrafting.sendSlotContents( this, wirelessIn.slotNumber, wirelessIn.getStack() );
|
||||
icrafting.sendSlotContents( this, wirelessOut.slotNumber, wirelessOut.getStack() );
|
||||
icrafting.sendSlotContents( this, this.wirelessIn.slotNumber, this.wirelessIn.getStack() );
|
||||
icrafting.sendSlotContents( this, this.wirelessOut.slotNumber, this.wirelessOut.getStack() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,19 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
{
|
||||
for (int x = 0; x < 9; x++)
|
||||
{
|
||||
addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
|
||||
this.addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
|
||||
}
|
||||
}
|
||||
|
||||
this.chest.openInventory();
|
||||
|
||||
bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer par1EntityPlayer)
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
chest.closeInventory();
|
||||
this.chest.closeInventory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,34 +54,34 @@ public class ContainerSpatialIOPort extends AEBaseContainer
|
||||
this.spatialIOPort = spatialIOPort;
|
||||
|
||||
if ( Platform.isServer() )
|
||||
network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
|
||||
this.network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, invPlayer ) );
|
||||
addSlotToContainer( new SlotOutput( spatialIOPort, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, this.invPlayer ) );
|
||||
this.addSlotToContainer( new SlotOutput( spatialIOPort, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
delay++;
|
||||
if ( delay > 15 && network != null )
|
||||
this.delay++;
|
||||
if ( this.delay > 15 && this.network != null )
|
||||
{
|
||||
delay = 0;
|
||||
this.delay = 0;
|
||||
|
||||
IEnergyGrid eg = network.getCache( IEnergyGrid.class );
|
||||
ISpatialCache sc = network.getCache( ISpatialCache.class );
|
||||
IEnergyGrid eg = this.network.getCache( IEnergyGrid.class );
|
||||
ISpatialCache sc = this.network.getCache( ISpatialCache.class );
|
||||
if ( eg != null )
|
||||
{
|
||||
currentPower = (long) (100.0 * eg.getStoredPower());
|
||||
maxPower = (long) (100.0 * eg.getMaxStoredPower());
|
||||
reqPower = (long) (100.0 * sc.requiredPower());
|
||||
eff = (long) (100.0f * sc.currentEfficiency());
|
||||
this.currentPower = (long) (100.0 * eg.getStoredPower());
|
||||
this.maxPower = (long) (100.0 * eg.getMaxStoredPower());
|
||||
this.reqPower = (long) (100.0 * sc.requiredPower());
|
||||
this.eff = (long) (100.0f * sc.currentEfficiency());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
|
||||
public ContainerStorageBus(InventoryPlayer ip, PartStorageBus te) {
|
||||
super( ip, te );
|
||||
storageBus = te;
|
||||
this.storageBus = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,7 +80,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
int upgrades = this.upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
|
||||
return upgrades > idx;
|
||||
}
|
||||
@@ -91,30 +91,30 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
int xo = 8;
|
||||
int yo = 23 + 6;
|
||||
|
||||
IInventory config = upgradeable.getInventoryByName( "config" );
|
||||
IInventory config = this.upgradeable.getInventoryByName( "config" );
|
||||
for (int y = 0; y < 7; y++)
|
||||
{
|
||||
for (int x = 0; x < 9; x++)
|
||||
{
|
||||
if ( y < 2 )
|
||||
addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( config, y * 9 + x, xo + x * 18, yo + y * 18 ) );
|
||||
else
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y - 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( config, this, y * 9 + x, xo, yo, x, y, y - 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, invPlayer )).setNotDraggable() );
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer )).setNotDraggable() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.invPlayer )).setNotDraggable() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
@@ -123,22 +123,22 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
this.storageFilter = (StorageFilter) this.upgradeable.getConfigManager().getSetting( Settings.STORAGE_FILTER );
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
inv.setInventorySlotContents( x, null );
|
||||
detectAndSendChanges();
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
|
||||
public void partition()
|
||||
{
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
|
||||
IMEInventory<IAEItemStack> cellInv = storageBus.getInternalHandler();
|
||||
IMEInventory<IAEItemStack> cellInv = this.storageBus.getInternalHandler();
|
||||
|
||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||
if ( cellInv != null )
|
||||
@@ -149,7 +149,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
{
|
||||
if ( i.hasNext() && isSlotEnabled( (x / 9) - 2 ) )
|
||||
if ( i.hasNext() && this.isSlotEnabled( (x / 9) - 2 ) )
|
||||
{
|
||||
ItemStack g = i.next().getItemStack();
|
||||
g.stackSize = 1;
|
||||
@@ -159,7 +159,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
inv.setInventorySlotContents( x, null );
|
||||
}
|
||||
|
||||
detectAndSendChanges();
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
|
||||
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
|
||||
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
|
||||
upgradeable = te;
|
||||
this.upgradeable = te;
|
||||
|
||||
World w = null;
|
||||
int xCoord = 0, yCoord = 0, zCoord = 0;
|
||||
@@ -79,65 +79,65 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
zCoord = mk.zCoord;
|
||||
}
|
||||
|
||||
IInventory pi = getPlayerInv();
|
||||
IInventory pi = this.getPlayerInv();
|
||||
for (int x = 0; x < pi.getSizeInventory(); x++)
|
||||
{
|
||||
ItemStack pii = pi.getStackInSlot( x );
|
||||
if ( pii != null && pii.getItem() instanceof ToolNetworkTool )
|
||||
{
|
||||
lockPlayerInventorySlot( x );
|
||||
tbSlot = x;
|
||||
tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord );
|
||||
this.lockPlayerInventorySlot( x );
|
||||
this.tbSlot = x;
|
||||
this.tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( hasToolbox() )
|
||||
if ( this.hasToolbox() )
|
||||
{
|
||||
for (int v = 0; v < 3; v++)
|
||||
for (int u = 0; u < 3; u++)
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbInventory, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
|
||||
invPlayer )).setPlayerSide() );
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, this.tbInventory, u + v * 3, 186 + u * 18, this.getHeight() - 82 + v * 18,
|
||||
this.invPlayer )).setPlayerSide() );
|
||||
}
|
||||
|
||||
setupConfig();
|
||||
this.setupConfig();
|
||||
|
||||
bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, this.getHeight() - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
protected void setupUpgrades()
|
||||
{
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
if ( availableUpgrades() > 0 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 1 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 2 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
if ( availableUpgrades() > 3 )
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
|
||||
IInventory upgrades = this.upgradeable.getInventoryByName( "upgrades" );
|
||||
if ( this.availableUpgrades() > 0 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 1 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 2 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.invPlayer )).setNotDraggable() );
|
||||
if ( this.availableUpgrades() > 3 )
|
||||
this.addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.invPlayer )).setNotDraggable() );
|
||||
}
|
||||
|
||||
protected void setupConfig()
|
||||
{
|
||||
int x = 80;
|
||||
int y = 40;
|
||||
setupUpgrades();
|
||||
this.setupUpgrades();
|
||||
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||
IInventory inv = this.upgradeable.getInventoryByName( "config" );
|
||||
this.addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
|
||||
|
||||
if ( supportCapacity() )
|
||||
if ( this.supportCapacity() )
|
||||
{
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 1, x, y, -1, 0, 1 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 2, x, y, 1, 0, 1 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 3, x, y, 0, -1, 1 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 4, x, y, 0, 1, 1 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 1, x, y, -1, 0, 1 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 2, x, y, 1, 0, 1 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 3, x, y, 0, -1, 1 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 4, x, y, 0, 1, 1 ) );
|
||||
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 5, x, y, -1, -1, 2 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 6, x, y, 1, -1, 2 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 7, x, y, -1, 1, 2 ) );
|
||||
addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 8, x, y, 1, 1, 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 5, x, y, -1, -1, 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 6, x, y, 1, -1, 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 7, x, y, -1, 1, 2 ) );
|
||||
this.addSlotToContainer( new OptionalSlotFakeTypeOnly( inv, this, 8, x, y, 1, 1, 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,21 +167,21 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
|
||||
public void checkToolbox()
|
||||
{
|
||||
if ( hasToolbox() )
|
||||
if ( this.hasToolbox() )
|
||||
{
|
||||
ItemStack currentItem = getPlayerInv().getStackInSlot( tbSlot );
|
||||
ItemStack currentItem = this.getPlayerInv().getStackInSlot( this.tbSlot );
|
||||
|
||||
if ( currentItem != tbInventory.getItemStack() )
|
||||
if ( currentItem != this.tbInventory.getItemStack() )
|
||||
{
|
||||
if ( currentItem != null )
|
||||
{
|
||||
if ( Platform.isSameItem( tbInventory.getItemStack(), currentItem ) )
|
||||
getPlayerInv().setInventorySlotContents( tbSlot, tbInventory.getItemStack() );
|
||||
if ( Platform.isSameItem( this.tbInventory.getItemStack(), currentItem ) )
|
||||
this.getPlayerInv().setInventorySlotContents( this.tbSlot, this.tbInventory.getItemStack() );
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,17 +189,17 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
this.verifyPermissions( SecurityPermissions.BUILD, false );
|
||||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
IConfigManager cm = this.upgradeable.getConfigManager();
|
||||
loadSettingsFromHost( cm );
|
||||
this.loadSettingsFromHost( cm );
|
||||
}
|
||||
|
||||
checkToolbox();
|
||||
this.checkToolbox();
|
||||
|
||||
for (Object o : inventorySlots)
|
||||
for (Object o : this.inventorySlots)
|
||||
{
|
||||
if ( o instanceof OptionalSlotFake )
|
||||
{
|
||||
@@ -209,14 +209,14 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
}
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
protected void loadSettingsFromHost(IConfigManager cm)
|
||||
{
|
||||
this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE );
|
||||
this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED );
|
||||
if ( upgradeable instanceof PartExportBus )
|
||||
if ( this.upgradeable instanceof PartExportBus )
|
||||
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
||||
}
|
||||
|
||||
@@ -227,13 +227,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
|
||||
public boolean hasToolbox()
|
||||
{
|
||||
return tbInventory != null;
|
||||
return this.tbInventory != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
int upgrades = this.upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
|
||||
if ( idx == 1 && upgrades > 0 )
|
||||
return true;
|
||||
|
||||
@@ -36,9 +36,9 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
|
||||
super( ip, vibrationChamber, null );
|
||||
this.vibrationChamber = vibrationChamber;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, invPlayer ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, this.invPlayer ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
public final int aePerTick = 5;
|
||||
@@ -64,7 +64,7 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return burnProgress > 0 ? burnSpeed : 0;
|
||||
return this.burnProgress > 0 ? this.burnSpeed : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,20 +40,20 @@ public class ContainerWireless extends AEBaseContainer
|
||||
|
||||
public ContainerWireless(InventoryPlayer ip, TileWireless te) {
|
||||
super( ip, te, null );
|
||||
wirelessTerminal = te;
|
||||
this.wirelessTerminal = te;
|
||||
|
||||
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, wirelessTerminal, 0, 80, 47, invPlayer ) );
|
||||
this.addSlotToContainer( this.boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, this.wirelessTerminal, 0, 80, 47, this.invPlayer ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
int boosters = boosterSlot.getStack() == null ? 0 : boosterSlot.getStack().stackSize;
|
||||
int boosters = this.boosterSlot.getStack() == null ? 0 : this.boosterSlot.getStack().stackSize;
|
||||
|
||||
range = (long) (10 * AEConfig.instance.wireless_getMaxRange( boosters ));
|
||||
drain = (long) (100 * AEConfig.instance.wireless_getPowerDrain( boosters ));
|
||||
this.range = (long) (10 * AEConfig.instance.wireless_getMaxRange( boosters ));
|
||||
this.drain = (long) (100 * AEConfig.instance.wireless_getPowerDrain( boosters ));
|
||||
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
@@ -39,16 +39,16 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
|
||||
if ( !wirelessTerminalGUIObject.rangeCheck() )
|
||||
if ( !this.wirelessTerminalGUIObject.rangeCheck() )
|
||||
{
|
||||
if ( Platform.isServer() && isContainerValid )
|
||||
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
|
||||
if ( Platform.isServer() && this.isContainerValid )
|
||||
this.getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
|
||||
|
||||
isContainerValid = false;
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wirelessTerminalGUIObject.getRange() );
|
||||
this.powerMultiplier = AEConfig.instance.wireless_getDrainRate( this.wirelessTerminalGUIObject.getRange() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@ public class CraftingCPURecord implements Comparable<CraftingCPURecord>
|
||||
this.size = size;
|
||||
this.processors = coProcessors;
|
||||
this.cpu = server;
|
||||
myName = server.getName();
|
||||
this.myName = server.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(CraftingCPURecord o)
|
||||
{
|
||||
int a = ItemSorters.compareLong( o.processors, processors );
|
||||
int a = ItemSorters.compareLong( o.processors, this.processors );
|
||||
if ( a != 0 )
|
||||
return a;
|
||||
return ItemSorters.compareLong( o.size, size );
|
||||
return ItemSorters.compareLong( o.size, this.size );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user