Merge pull request #157 from thatsIch/Spelling

Spelling
This commit is contained in:
Chris
2014-09-28 10:09:39 -07:00
220 changed files with 1644 additions and 1665 deletions
@@ -195,10 +195,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
int y = 29;
int offset = 0;
IInventory cell = myte.getInventoryByName( "cell" );
IInventory cell = upgradeable.getInventoryByName( "cell" );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
// null, 3 * 8 );
@@ -271,7 +271,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
public void clear()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
for (int x = 0; x < inv.getSizeInventory(); x++)
inv.setInventorySlotContents( x, null );
detectAndSendChanges();
@@ -279,10 +279,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
public void partition()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
.getCellInventory( myte.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
.getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
if ( cellInv != null )
@@ -8,15 +8,15 @@ import appeng.tile.storage.TileChest;
public class ContainerChest extends AEBaseContainer
{
TileChest myte;
TileChest chest;
public ContainerChest(InventoryPlayer ip, TileChest te) {
super( ip, te, null );
myte = te;
public ContainerChest(InventoryPlayer ip, TileChest chest) {
super( ip, chest, null );
this.chest = chest;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
}
@@ -13,17 +13,17 @@ import appeng.util.Platform;
public class ContainerCondenser extends AEBaseContainer
{
TileCondenser myte;
TileCondenser condenser;
public ContainerCondenser(InventoryPlayer ip, TileCondenser te) {
super( ip, te, null );
myte = te;
public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) {
super( ip, condenser, null );
this.condenser = condenser;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) );
addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
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 ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
}
@Override
@@ -31,13 +31,13 @@ public class ContainerCondenser extends AEBaseContainer
{
if ( Platform.isServer() )
{
double maxStorage = this.myte.getStorage();
double requiredEnergy = this.myte.getRequiredPower();
double maxStorage = this.condenser.getStorage();
double requiredEnergy = this.condenser.getRequiredPower();
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
this.requiredEnergy = (int) maxDisplay;
this.storedPower = (int) this.myte.storedPower;
this.output = (CondenserOutput) this.myte.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
this.storedPower = (int) this.condenser.storedPower;
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
}
super.detectAndSendChanges();
@@ -8,19 +8,19 @@ import appeng.tile.storage.TileDrive;
public class ContainerDrive extends AEBaseContainer
{
TileDrive myte;
TileDrive drive;
public ContainerDrive(InventoryPlayer ip, TileDrive te) {
super( ip, te, null );
myte = te;
public ContainerDrive(InventoryPlayer ip, TileDrive drive) {
super( ip, drive, null );
this.drive = drive;
for (int y = 0; y < 5; y++)
for (int x = 0; x < 2; x++)
{
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
}
bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
}
}
@@ -43,7 +43,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
return upgrades > idx;
}
@@ -54,7 +54,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
int xo = 8;
int yo = 23 + 6;
IInventory config = myte.getInventoryByName( "config" );
IInventory config = upgradeable.getInventoryByName( "config" );
for (int y = 0; y < 7; y++)
{
for (int x = 0; x < 9; x++)
@@ -66,7 +66,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
}
}
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@@ -81,7 +81,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
}
standardDetectAndSendChanges();
@@ -10,23 +10,23 @@ import appeng.tile.grindstone.TileGrinder;
public class ContainerGrinder extends AEBaseContainer
{
TileGrinder myte;
TileGrinder grinder;
public ContainerGrinder(InventoryPlayer ip, TileGrinder te) {
super( ip, te, null );
myte = te;
public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) {
super( ip, grinder, null );
this.grinder = grinder;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) );
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 ) );
addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) );
addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( te, 4, 112 + 18, 63, 2 * 16 + 15 ) );
addSlotToContainer( new SlotOutput( te, 5, 112 + 36, 63, 2 * 16 + 15 ) );
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 ) );
bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
}
}
@@ -49,22 +49,22 @@ public class ContainerIOPort extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int offx = 19;
int offy = 17;
int offX = 19;
int offY = 17;
IInventory cells = myte.getInventoryByName( "cells" );
IInventory cells = 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 ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, invPlayer ) );
offx = 122;
offy = 17;
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 ) );
addSlotToContainer( new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@@ -77,9 +77,9 @@ public class ContainerIOPort extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.opMode = (OperationMode) myte.getConfigManager().getSetting( Settings.OPERATION_MODE );
this.fMode = (FullnessMode) this.myte.getConfigManager().getSetting( Settings.FULLNESS_MODE );
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
this.opMode = (OperationMode) 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();
@@ -4,6 +4,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput;
@@ -38,7 +39,7 @@ public class ContainerInscriber extends ContainerUpgradeable
addSlotToContainer( new SlotOutput( ti, 3, 113, 40, -1 ) );
bindPlayerInventory( ip, 0, getHeight() - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 );
}
@@ -71,7 +71,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
if ( Platform.isServer() )
g = anchor.getActionableNode().getGrid();
bindPlayerInventory( ip, 0, 222 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 222 - /* height of player inventory */82 );
}
NBTTagCompound data = new NBTTagCompound();
@@ -109,7 +109,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
switch (action)
{
case PICKUP_OR_SETDOWN:
case PICKUP_OR_SET_DOWN:
if ( hasItemInHand )
{
@@ -142,7 +142,7 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
}
break;
case SPLIT_OR_PLACESINGLE:
case SPLIT_OR_PLACE_SINGLE:
if ( hasItemInHand )
{
@@ -345,12 +345,12 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
private void addItems(NBTTagCompound data, InvTracker inv, int offset, int length)
{
String name = "=" + Long.toString( inv.which, Character.MAX_RADIX );
NBTTagCompound invv = data.getCompoundTag( name );
NBTTagCompound tag = data.getCompoundTag( name );
if ( invv.hasNoTags() )
if ( tag.hasNoTags() )
{
invv.setLong( "sortBy", inv.sortBy );
invv.setString( "un", inv.unlocalizedName );
tag.setLong( "sortBy", inv.sortBy );
tag.setString( "un", inv.unlocalizedName );
}
for (int x = 0; x < length; x++)
@@ -365,9 +365,9 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
if ( is != null )
is.writeToNBT( itemNBT );
invv.setTag( Integer.toString( x + offset ), itemNBT );
tag.setTag( Integer.toString( x + offset ), itemNBT );
}
data.setTag( name, invv );
data.setTag( name, tag );
}
}
@@ -63,7 +63,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
int x = 80 + 44;
int y = 40;
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 )
@@ -73,7 +73,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
if ( availableUpgrades() > 3 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, invPlayer )).setNotDraggable() );
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
}
@@ -94,10 +94,10 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.EmitterValue = lvlEmitter.getReportingValue();
this.cmType = (YesNo) this.myte.getConfigManager().getSetting( Settings.CRAFT_VIA_REDSTONE );
this.lvType = (LevelType) this.myte.getConfigManager().getSetting( Settings.LEVEL_TYPE );
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_EMITTER );
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();
@@ -48,7 +48,7 @@ public class ContainerMAC extends ContainerUpgradeable
public boolean isValidItemForSlot(int slotIndex, ItemStack i)
{
IInventory mac = myte.getInventoryByName( "mac" );
IInventory mac = upgradeable.getInventoryByName( "mac" );
ItemStack is = mac.getStackInSlot( 10 );
if ( is == null )
@@ -69,28 +69,28 @@ public class ContainerMAC extends ContainerUpgradeable
@Override
protected void setupConfig()
{
int offx = 29;
int offy = 30;
int offX = 29;
int offY = 30;
IInventory mac = myte.getInventoryByName( "mac" );
IInventory mac = 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 );
SlotMACPattern s = new SlotMACPattern( this, mac, x + y * 3, offX + x * 18, offY + y * 18 );
addSlotToContainer( s );
}
offx = 126;
offy = 16;
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 ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, invPlayer ) );
addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
offx = 122;
offy = 17;
offX = 122;
offY = 17;
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@@ -105,7 +105,7 @@ public class ContainerMAC extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.rsMode = (RedstoneMode) this.myte.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
this.rsMode = (RedstoneMode) this.upgradeable.getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED );
}
craftProgress = this.tma.getCraftingProgress();
@@ -121,7 +121,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
{
for (int y = 0; y < 5; y++)
{
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEWCELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ((IViewCellStorage) monitorable).getViewCellStorage(), y, 206, y * 18 + 8,
invPlayer );
cellView[y].allowEdit = canAccessViewCells;
addSlotToContainer( cellView[y] );
@@ -27,7 +27,7 @@ public class ContainerNetworkTool extends AEBaseContainer
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 )) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
public void toggleFacadeMode()
@@ -178,7 +178,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
ItemStack[] in = getInputs();
ItemStack[] out = getOutputs();
// if theres no input, this would be silly.
// if there is no input, this would be silly.
if ( in == null || out == null )
return;
@@ -8,13 +8,13 @@ import appeng.tile.qnb.TileQuantumBridge;
public class ContainerQNB extends AEBaseContainer
{
TileQuantumBridge myte;
TileQuantumBridge quantumBridge;
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge te) {
super( ip, te, null );
myte = te;
public ContainerQNB(InventoryPlayer ip, TileQuantumBridge quantumBridge) {
super( ip, quantumBridge, null );
this.quantumBridge = quantumBridge;
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, te, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge, 0, 80, 37, invPlayer )).setStackLimit( 1 ) );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
@@ -41,7 +41,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
lockPlayerInventorySlot( ip.currentItem );
bindPlayerInventory( ip, 0, 184 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 184 - /* height of player inventory */82 );
}
@Override
@@ -39,7 +39,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
addSlotToContainer( configSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33, ip ) );
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
addSlotToContainer( wirelessIn = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODABLE_ITEM, wirelessEncoder, 0, 212, 10, ip ) );
addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) );
bindPlayerInventory( ip, 0, 0 );
@@ -117,18 +117,18 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
if ( wirelessIn.getHasStack() )
{
ItemStack term = wirelessIn.getStack().copy();
INetworkEncodable netEncodeable = null;
INetworkEncodable networkEncodable = null;
if ( term.getItem() instanceof INetworkEncodable )
netEncodeable = (INetworkEncodable) term.getItem();
networkEncodable = (INetworkEncodable) term.getItem();
IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
if ( wTermHandler != null )
netEncodeable = wTermHandler;
networkEncodable = wTermHandler;
if ( netEncodeable != null )
if ( networkEncodable != null )
{
netEncodeable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
networkEncodable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
wirelessIn.putStack( null );
wirelessOut.putStack( term );
@@ -11,29 +11,29 @@ import appeng.tile.storage.TileSkyChest;
public class ContainerSkyChest extends AEBaseContainer
{
TileSkyChest myte;
TileSkyChest chest;
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest te) {
super( ip, te, null );
myte = te;
public ContainerSkyChest(InventoryPlayer ip, TileSkyChest chest) {
super( ip, chest, null );
this.chest = chest;
for (int y = 0; y < 4; y++)
{
for (int x = 0; x < 9; x++)
{
addSlotToContainer( new SlotNormal( myte, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
addSlotToContainer( new SlotNormal( this.chest, y * 9 + x, 8 + 18 * x, 24 + 18 * y ) );
}
}
myte.openInventory();
this.chest.openInventory();
bindPlayerInventory( ip, 0, 195 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
}
@Override
public void onContainerClosed(EntityPlayer par1EntityPlayer)
{
super.onContainerClosed( par1EntityPlayer );
myte.closeInventory();
chest.closeInventory();
}
}
@@ -16,7 +16,7 @@ import appeng.util.Platform;
public class ContainerSpatialIOPort extends AEBaseContainer
{
TileSpatialIOPort myte;
TileSpatialIOPort spatialIOPort;
IGrid network;
@@ -31,17 +31,17 @@ public class ContainerSpatialIOPort extends AEBaseContainer
int delay = 40;
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort te) {
super( ip, te, null );
myte = te;
public ContainerSpatialIOPort(InventoryPlayer ip, TileSpatialIOPort spatialIOPort) {
super( ip, spatialIOPort, null );
this.spatialIOPort = spatialIOPort;
if ( Platform.isServer() )
network = te.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, te, 0, 52, 48, invPlayer ) );
addSlotToContainer( new SlotOutput( te, 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
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 ) );
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
}
@Override
@@ -60,7 +60,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
return upgrades > idx;
}
@@ -71,7 +71,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
int xo = 8;
int yo = 23 + 6;
IInventory config = myte.getInventoryByName( "config" );
IInventory config = upgradeable.getInventoryByName( "config" );
for (int y = 0; y < 7; y++)
{
for (int x = 0; x < 9; x++)
@@ -83,7 +83,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
}
}
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
@@ -98,9 +98,9 @@ public class ContainerStorageBus extends ContainerUpgradeable
if ( Platform.isServer() )
{
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rwMode = (AccessRestriction) this.myte.getConfigManager().getSetting( Settings.ACCESS );
this.storageFilter = (StorageFilter) this.myte.getConfigManager().getSetting( Settings.STORAGE_FILTER );
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
this.rwMode = (AccessRestriction) this.upgradeable.getConfigManager().getSetting( Settings.ACCESS );
this.storageFilter = (StorageFilter) this.upgradeable.getConfigManager().getSetting( Settings.STORAGE_FILTER );
}
standardDetectAndSendChanges();
@@ -108,7 +108,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
public void clear()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
for (int x = 0; x < inv.getSizeInventory(); x++)
inv.setInventorySlotContents( x, null );
detectAndSendChanges();
@@ -116,7 +116,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
public void partition()
{
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
IMEInventory<IAEItemStack> cellInv = storageBus.getInternalHandler();
@@ -29,25 +29,25 @@ import appeng.util.Platform;
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
{
IUpgradeableHost myte;
IUpgradeableHost upgradeable;
int tbslot;
NetworkToolViewer tbinv;
int tbSlot;
NetworkToolViewer tbInventory;
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
myte = te;
upgradeable = te;
World w = null;
int xCoor = 0, yCoor = 0, zCoor = 0;
int xCoord = 0, yCoord = 0, zCoord = 0;
if ( te instanceof TileEntity )
{
TileEntity myTile = (TileEntity) te;
w = myTile.getWorldObj();
xCoor = myTile.xCoord;
yCoor = myTile.yCoord;
zCoor = myTile.zCoord;
xCoord = myTile.xCoord;
yCoord = myTile.yCoord;
zCoord = myTile.zCoord;
}
if ( te instanceof IPart )
@@ -55,9 +55,9 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
IUpgradeableHost myTile = (IUpgradeableHost) te;
TileEntity mk = myTile.getTile();
w = mk.getWorldObj();
xCoor = mk.xCoord;
yCoor = mk.yCoord;
zCoor = mk.zCoord;
xCoord = mk.xCoord;
yCoord = mk.yCoord;
zCoord = mk.zCoord;
}
IInventory pi = getPlayerInv();
@@ -67,8 +67,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
if ( pii != null && pii.getItem() instanceof ToolNetworkTool )
{
lockPlayerInventorySlot( x );
tbslot = x;
tbinv = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor );
tbSlot = x;
tbInventory = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoord, yCoord, zCoord );
break;
}
}
@@ -77,18 +77,18 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
for (int v = 0; v < 3; v++)
for (int u = 0; u < 3; u++)
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbinv, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, tbInventory, u + v * 3, 186 + u * 18, getHeight() - 82 + v * 18,
invPlayer )).setPlayerSide() );
}
setupConfig();
bindPlayerInventory( ip, 0, getHeight() - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, getHeight() - /* height of player inventory */82 );
}
protected void setupUpgrades()
{
IInventory upgrades = myte.getInventoryByName( "upgrades" );
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
if ( availableUpgrades() > 0 )
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
if ( availableUpgrades() > 1 )
@@ -105,7 +105,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
int y = 40;
setupUpgrades();
IInventory inv = myte.getInventoryByName( "config" );
IInventory inv = upgradeable.getInventoryByName( "config" );
addSlotToContainer( new SlotFakeTypeOnly( inv, 0, x, y ) );
if ( supportCapacity() )
@@ -150,14 +150,14 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
if ( hasToolbox() )
{
ItemStack currentItem = getPlayerInv().getStackInSlot( tbslot );
ItemStack currentItem = getPlayerInv().getStackInSlot( tbSlot );
if ( currentItem != tbinv.getItemStack() )
if ( currentItem != tbInventory.getItemStack() )
{
if ( currentItem != null )
{
if ( Platform.isSameItem( tbinv.getItemStack(), currentItem ) )
getPlayerInv().setInventorySlotContents( tbslot, tbinv.getItemStack() );
if ( Platform.isSameItem( tbInventory.getItemStack(), currentItem ) )
getPlayerInv().setInventorySlotContents( tbSlot, tbInventory.getItemStack() );
else
isContainerValid = false;
}
@@ -174,7 +174,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
if ( Platform.isServer() )
{
IConfigManager cm = this.myte.getConfigManager();
IConfigManager cm = this.upgradeable.getConfigManager();
loadSettingsFromHost( cm );
}
@@ -197,7 +197,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
{
this.fzMode = (FuzzyMode) cm.getSetting( Settings.FUZZY_MODE );
this.rsMode = (RedstoneMode) cm.getSetting( Settings.REDSTONE_CONTROLLED );
if ( myte instanceof PartExportBus )
if ( upgradeable instanceof PartExportBus )
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
}
@@ -208,13 +208,13 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
public boolean hasToolbox()
{
return tbinv != null;
return tbInventory != null;
}
@Override
public boolean isSlotEnabled(int idx)
{
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
if ( idx == 1 && upgrades > 0 )
return true;
@@ -10,15 +10,15 @@ import appeng.util.Platform;
public class ContainerVibrationChamber extends AEBaseContainer
{
TileVibrationChamber myte;
TileVibrationChamber vibrationChamber;
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber te) {
super( ip, te, null );
myte = te;
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber vibrationChamber) {
super( ip, vibrationChamber, null );
this.vibrationChamber = vibrationChamber;
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, te, 0, 80, 37, invPlayer ) );
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber, 0, 80, 37, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
public int aePerTick = 5;
@@ -34,8 +34,8 @@ public class ContainerVibrationChamber extends AEBaseContainer
{
if ( Platform.isServer() )
{
this.burnProgress = (int) (this.myte.maxBurnTime <= 0 ? 0 : 12 * this.myte.burnTime / this.myte.maxBurnTime);
this.burnSpeed = this.myte.burnSpeed;
this.burnProgress = (int) (this.vibrationChamber.maxBurnTime <= 0 ? 0 : 12 * this.vibrationChamber.burnTime / this.vibrationChamber.maxBurnTime);
this.burnSpeed = this.vibrationChamber.burnSpeed;
}
super.detectAndSendChanges();
@@ -10,7 +10,7 @@ import appeng.tile.networking.TileWireless;
public class ContainerWireless extends AEBaseContainer
{
TileWireless myte;
TileWireless wirelessTerminal;
@GuiSync(1)
public long range = 0;
@@ -22,11 +22,11 @@ public class ContainerWireless extends AEBaseContainer
public ContainerWireless(InventoryPlayer ip, TileWireless te) {
super( ip, te, null );
myte = te;
wirelessTerminal = te;
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, myte, 0, 80, 47, invPlayer ) );
addSlotToContainer( boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, wirelessTerminal, 0, 80, 47, invPlayer ) );
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
}
@Override
@@ -9,11 +9,11 @@ import appeng.util.Platform;
public class ContainerWirelessTerm extends ContainerMEPortableCell
{
WirelessTerminalGuiObject wtgo;
WirelessTerminalGuiObject wirelessTerminalGUIObject;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject monitorable) {
super( ip, monitorable );
wtgo = monitorable;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject wirelessTerminalGUIObject) {
super( ip, wirelessTerminalGUIObject );
this.wirelessTerminalGUIObject = wirelessTerminalGUIObject;
}
@Override
@@ -21,7 +21,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
{
super.detectAndSendChanges();
if ( !wtgo.rangeCheck() )
if ( !wirelessTerminalGUIObject.rangeCheck() )
{
if ( Platform.isServer() && isContainerValid )
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
@@ -30,7 +30,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
}
else
{
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wtgo.getRange() );
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wirelessTerminalGUIObject.getRange() );
}
}
}