Most of the 1.8 Port.
This commit is contained in:
@@ -27,7 +27,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.CopyMode;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -147,7 +147,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
ItemStack is = this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
if( this.workBench.getWorldObj().getTileEntity( this.workBench.xCoord, this.workBench.yCoord, this.workBench.zCoord ) != this.workBench )
|
||||
if( this.workBench.getWorld().getTileEntity( this.workBench.getPos() ) != this.workBench )
|
||||
{
|
||||
this.isContainerValid = false;
|
||||
}
|
||||
@@ -295,13 +295,13 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
public String getName()
|
||||
{
|
||||
return "Upgrades";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
public boolean hasCustomName()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -325,13 +325,17 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
public void openInventory(
|
||||
EntityPlayer player )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
public void closeInventory(
|
||||
EntityPlayer player )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -339,5 +343,38 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
{
|
||||
return ContainerCellWorkbench.this.getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getField(
|
||||
int id )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setField(
|
||||
int id,
|
||||
int value )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFieldCount()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear()
|
||||
{
|
||||
ContainerCellWorkbench.this.getCellUpgradeInventory().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.tile.storage.TileChest;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.CondenserOutput;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.container.implementations;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
|
||||
@@ -24,8 +24,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -33,7 +31,6 @@ import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -63,6 +60,8 @@ import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
||||
public class ContainerCraftConfirm extends AEBaseContainer
|
||||
{
|
||||
|
||||
@@ -25,8 +25,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridHost;
|
||||
@@ -38,6 +36,7 @@ import appeng.api.networking.storage.IBaseMonitor;
|
||||
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.core.AELog;
|
||||
@@ -70,8 +69,8 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
|
||||
if( host != null )
|
||||
{
|
||||
this.findNode( host, ForgeDirection.UNKNOWN );
|
||||
for( ForgeDirection d : ForgeDirection.VALID_DIRECTIONS )
|
||||
this.findNode( host, AEPartLocation.INTERNAL );
|
||||
for( AEPartLocation d : AEPartLocation.SIDE_LOCATIONS )
|
||||
{
|
||||
this.findNode( host, d );
|
||||
}
|
||||
@@ -88,7 +87,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
}
|
||||
}
|
||||
|
||||
private void findNode( IGridHost host, ForgeDirection d )
|
||||
private void findNode( IGridHost host, AEPartLocation d )
|
||||
{
|
||||
if( this.network == null )
|
||||
{
|
||||
|
||||
@@ -22,15 +22,14 @@ package appeng.container.implementations;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingCPU;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
||||
public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.container.ContainerNull;
|
||||
import appeng.container.slot.SlotCraftingMatrix;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
|
||||
@@ -21,7 +21,6 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotInaccessible;
|
||||
import appeng.container.slot.SlotOutput;
|
||||
|
||||
@@ -21,7 +21,6 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import appeng.api.config.FullnessMode;
|
||||
import appeng.api.config.OperationMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.container.implementations;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.features.IInscriberRecipe;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
|
||||
@@ -29,8 +29,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.networking.IGrid;
|
||||
@@ -283,13 +282,13 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
case SHIFT_CLICK:
|
||||
|
||||
IInventory mySlot = slotInv.getWrapper( slot );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
|
||||
mySlot.setInventorySlotContents( 0, playerInv.addItems( mySlot.getStackInSlot( 0 ) ) );
|
||||
|
||||
break;
|
||||
case MOVE_REGION:
|
||||
|
||||
InventoryAdaptor playerInvAd = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
|
||||
InventoryAdaptor playerInvAd = InventoryAdaptor.getAdaptor( player, EnumFacing.UP );
|
||||
for( int x = 0; x < inv.server.getSizeInventory(); x++ )
|
||||
{
|
||||
inv.server.setInventorySlotContents( x, playerInvAd.addItems( inv.server.getStackInSlot( x ) ) );
|
||||
|
||||
@@ -23,10 +23,8 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.LevelType;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -64,7 +63,7 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
|
||||
if( is.getItem() instanceof ItemEncodedPattern )
|
||||
{
|
||||
World w = this.getTileEntity().getWorldObj();
|
||||
World w = this.getTileEntity().getWorld();
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
ICraftingPatternDetails ph = iep.getPatternForItem( is, w );
|
||||
if( ph.isCraftable() )
|
||||
|
||||
@@ -28,8 +28,6 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
@@ -54,6 +52,7 @@ import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -122,7 +121,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
}
|
||||
else if( monitorable instanceof IGridHost )
|
||||
{
|
||||
IGridNode node = ( (IGridHost) monitorable ).getGridNode( ForgeDirection.UNKNOWN );
|
||||
IGridNode node = ( (IGridHost) monitorable ).getGridNode( AEPartLocation.INTERNAL );
|
||||
if( node != null )
|
||||
{
|
||||
this.networkNode = node;
|
||||
|
||||
@@ -21,7 +21,6 @@ package appeng.container.implementations;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
|
||||
@@ -25,8 +25,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.networking.IGrid;
|
||||
@@ -36,6 +34,7 @@ import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
@@ -65,8 +64,8 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
|
||||
if( host != null )
|
||||
{
|
||||
this.findNode( host, ForgeDirection.UNKNOWN );
|
||||
for( ForgeDirection d : ForgeDirection.VALID_DIRECTIONS )
|
||||
this.findNode( host, AEPartLocation.INTERNAL );
|
||||
for( AEPartLocation d : AEPartLocation.SIDE_LOCATIONS )
|
||||
{
|
||||
this.findNode( host, d );
|
||||
}
|
||||
@@ -78,7 +77,7 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
private void findNode( IGridHost host, ForgeDirection d )
|
||||
private void findNode( IGridHost host, AEPartLocation d )
|
||||
{
|
||||
if( this.network == null )
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ package appeng.container.implementations;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
|
||||
@@ -36,8 +36,7 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
@@ -349,7 +348,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
IAEItemStack out = packetPatternSlot.slotItem.copy();
|
||||
|
||||
InventoryAdaptor inv = new AdaptorPlayerHand( this.getPlayerInv().player );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( this.getPlayerInv().player, ForgeDirection.UNKNOWN );
|
||||
InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( this.getPlayerInv().player, EnumFacing.UP );
|
||||
if( packetPatternSlot.shift )
|
||||
{
|
||||
inv = playerInv;
|
||||
|
||||
@@ -23,10 +23,8 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
|
||||
@@ -24,9 +24,9 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.QuartzKnifeOutput;
|
||||
@@ -194,13 +194,13 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
public String getName()
|
||||
{
|
||||
return "Quartz Knife Output";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
public boolean hasCustomName()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -224,20 +224,55 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
public void openInventory(
|
||||
EntityPlayer player )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
public void closeInventory(
|
||||
EntityPlayer player )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot( int var1, ItemStack var2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getField(
|
||||
int id )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setField(
|
||||
int id,
|
||||
int value )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFieldCount()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear()
|
||||
{
|
||||
this.inSlot.setInventorySlotContents( 0, null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.features.INetworkEncodable;
|
||||
|
||||
@@ -19,11 +19,9 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import invtweaks.api.container.ChestContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import invtweaks.api.container.ChestContainer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotNormal;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
@@ -48,7 +46,7 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
this.chest.openInventory();
|
||||
this.chest.openInventory(ip.player);
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
||||
}
|
||||
@@ -57,6 +55,6 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
public void onContainerClosed( EntityPlayer par1EntityPlayer )
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
this.chest.closeInventory();
|
||||
this.chest.closeInventory(par1EntityPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,11 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.networking.spatial.ISpatialCache;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.slot.SlotOutput;
|
||||
@@ -56,7 +55,7 @@ public class ContainerSpatialIOPort extends AEBaseContainer
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
this.network = spatialIOPort.getGridNode( ForgeDirection.UNKNOWN ).getGrid();
|
||||
this.network = spatialIOPort.getGridNode( AEPartLocation.INTERNAL ).getGrid();
|
||||
}
|
||||
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort, 0, 52, 48, this.invPlayer ) );
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.Iterator;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -74,19 +74,19 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
if( te instanceof TileEntity )
|
||||
{
|
||||
TileEntity myTile = (TileEntity) te;
|
||||
w = myTile.getWorldObj();
|
||||
xCoord = myTile.xCoord;
|
||||
yCoord = myTile.yCoord;
|
||||
zCoord = myTile.zCoord;
|
||||
w = myTile.getWorld();
|
||||
xCoord = myTile.getPos().getX();
|
||||
yCoord = myTile.getPos().getY();
|
||||
zCoord = myTile.getPos().getZ();
|
||||
}
|
||||
|
||||
if( te instanceof IPart )
|
||||
{
|
||||
TileEntity mk = te.getTile();
|
||||
w = mk.getWorldObj();
|
||||
xCoord = mk.xCoord;
|
||||
yCoord = mk.yCoord;
|
||||
zCoord = mk.zCoord;
|
||||
w = mk.getWorld();
|
||||
xCoord = mk.getPos().getX();
|
||||
yCoord = mk.getPos().getY();
|
||||
zCoord = mk.getPos().getZ();
|
||||
}
|
||||
|
||||
IInventory pi = this.getPlayerInv();
|
||||
@@ -97,7 +97,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
{
|
||||
this.lockPlayerInventorySlot( x );
|
||||
this.tbSlot = x;
|
||||
this.tbInventory = (NetworkToolViewer) ( (IGuiItem) pii.getItem() ).getGuiObject( pii, w, xCoord, yCoord, zCoord );
|
||||
this.tbInventory = (NetworkToolViewer) ( (IGuiItem) pii.getItem() ).getGuiObject( pii, w, new BlockPos( xCoord, yCoord, zCoord ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
|
||||
Reference in New Issue
Block a user