Refactoring API stuff
This commit is contained in:
parent
dfbc8a6c79
commit
42424f80c8
|
@ -23,8 +23,8 @@ import net.minecraft.util.Vec3;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.IMemoryCard;
|
||||
import appeng.api.implementations.MemoryCardMessages;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.implementations.items.MemoryCardMessages;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import appeng.api.AEApi;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.ICrankable;
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderBlockCrank;
|
||||
|
|
|
@ -13,7 +13,7 @@ import appeng.api.config.ActionItems;
|
|||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
|
|
@ -6,7 +6,8 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.implementations.IMEChest;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.implementations.tiles.IMEChest;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.AEBaseMEGui;
|
||||
|
@ -18,7 +19,6 @@ import appeng.container.implementations.ContainerMEMonitorable;
|
|||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.core.Configuration;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.ICellItemViewer;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class GuiMEMonitorable extends AEBaseMEGui
|
|||
xSize = 195;
|
||||
ySize = 204;
|
||||
|
||||
if ( te instanceof ICellItemViewer )
|
||||
if ( te instanceof IPortableCell )
|
||||
myName = GuiText.PortableCell;
|
||||
if ( te instanceof IMEChest )
|
||||
myName = GuiText.Chest;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import appeng.helpers.ICellItemViewer;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
|
||||
public class GuiMEPortableCell extends GuiMEMonitorable
|
||||
{
|
||||
|
||||
public GuiMEPortableCell(InventoryPlayer inventoryPlayer, ICellItemViewer te) {
|
||||
public GuiMEPortableCell(InventoryPlayer inventoryPlayer, IPortableCell te) {
|
||||
super( inventoryPlayer, te );
|
||||
maxRows = 3;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
|
@ -16,7 +17,6 @@ import appeng.client.me.ItemRepo;
|
|||
import appeng.client.me.SlotME;
|
||||
import appeng.container.implementations.ContainerNetworkStatus;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.INetworkTool;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiNetworkStatus extends AEBaseGui
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerNetworkTool;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.INetworkTool;
|
||||
|
||||
public class GuiNetworkTool extends AEBaseGui
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ import appeng.api.config.FuzzyMode;
|
|||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerUpgradeable;
|
||||
|
@ -24,12 +24,12 @@ public class GuiUpgradeable extends AEBaseGui
|
|||
{
|
||||
|
||||
ContainerUpgradeable cvb;
|
||||
IBusCommon bc;
|
||||
IUpgradeableHost bc;
|
||||
|
||||
GuiImgButton redstoneMode;
|
||||
GuiImgButton fuzzyMode;
|
||||
|
||||
public GuiUpgradeable(InventoryPlayer inventoryPlayer, IBusCommon te) {
|
||||
public GuiUpgradeable(InventoryPlayer inventoryPlayer, IUpgradeableHost te) {
|
||||
this( new ContainerUpgradeable( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class GuiUpgradeable extends AEBaseGui
|
|||
super( te );
|
||||
cvb = (ContainerUpgradeable) te;
|
||||
|
||||
bc = (IBusCommon) te.getTarget();
|
||||
bc = (IUpgradeableHost) te.getTarget();
|
||||
this.xSize = hasToolbox() ? 246 : 211;
|
||||
this.ySize = 184;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package appeng.client.render.blocks;
|
|||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.item.ItemStack;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import appeng.api.implementations.IPartStorageMonitor;
|
||||
import appeng.api.implementations.parts.IPartStorageMonitor;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
|
|
|
@ -8,7 +8,8 @@ import net.minecraft.inventory.ICrafting;
|
|||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.IMEChest;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.implementations.tiles.IMEChest;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
|
@ -22,7 +23,6 @@ import appeng.api.storage.data.IAEItemStack;
|
|||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
||||
import appeng.helpers.ICellItemViewer;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.ItemList;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
@ -44,8 +44,8 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IMEMonito
|
|||
|
||||
cellInv = monitor;
|
||||
|
||||
if ( montiorable instanceof ICellItemViewer )
|
||||
powerSrc = (ICellItemViewer) montiorable;
|
||||
if ( montiorable instanceof IPortableCell )
|
||||
powerSrc = (IPortableCell) montiorable;
|
||||
else if ( montiorable instanceof IMEChest )
|
||||
powerSrc = (IMEChest) montiorable;
|
||||
else if ( montiorable instanceof IGridHost )
|
||||
|
|
|
@ -4,16 +4,16 @@ 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;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
import appeng.helpers.ICellItemViewer;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
{
|
||||
|
||||
ICellItemViewer civ;
|
||||
IPortableCell civ;
|
||||
|
||||
public ContainerMEPortableCell(InventoryPlayer ip, ICellItemViewer montiorable) {
|
||||
public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell montiorable) {
|
||||
super( ip, (IStorageMonitorable) montiorable, Platform.isServer() );
|
||||
lockPlayerInventorySlot( ip.currentItem );
|
||||
civ = montiorable;
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridBlock;
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
@ -17,7 +18,6 @@ import appeng.api.storage.data.IAEItemStack;
|
|||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
||||
import appeng.helpers.INetworkTool;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
|
|
@ -2,10 +2,10 @@ package appeng.container.implementations;
|
|||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
||||
import appeng.helpers.INetworkTool;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerNetworkTool extends AEBaseContainer
|
||||
|
|
|
@ -10,7 +10,7 @@ import appeng.api.config.FuzzyMode;
|
|||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.IOptionalSlotHost;
|
||||
|
@ -19,7 +19,7 @@ import appeng.container.slot.OptionalSlotFakeTypeOnly;
|
|||
import appeng.container.slot.SlotFakeTypeOnly;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
||||
import appeng.helpers.NetworkToolInv;
|
||||
import appeng.helpers.NetworkToolViewer;
|
||||
import appeng.items.tools.ToolNetworkTool;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -28,12 +28,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSlotHost
|
||||
{
|
||||
|
||||
IBusCommon myte;
|
||||
IUpgradeableHost myte;
|
||||
|
||||
int tbslot;
|
||||
NetworkToolInv tbinv;
|
||||
NetworkToolViewer tbinv;
|
||||
|
||||
public ContainerUpgradeable(InventoryPlayer ip, IBusCommon te) {
|
||||
public ContainerUpgradeable(InventoryPlayer ip, IUpgradeableHost te) {
|
||||
super( ip, (TileEntity) (te instanceof TileEntity ? te : null), (IPart) (te instanceof IPart ? te : null) );
|
||||
myte = te;
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||
|
||||
if ( te instanceof IPart )
|
||||
{
|
||||
IBusCommon myTile = (IBusCommon) te;
|
||||
IUpgradeableHost myTile = (IUpgradeableHost) te;
|
||||
TileEntity mk = myTile.getTile();
|
||||
w = mk.getWorldObj();
|
||||
xCoor = mk.xCoord;
|
||||
|
@ -67,7 +67,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||
{
|
||||
lockPlayerInventorySlot( x );
|
||||
tbslot = x;
|
||||
tbinv = (NetworkToolInv) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor );
|
||||
tbinv = (NetworkToolViewer) ((ToolNetworkTool) pii.getItem()).getGuiObject( pii, w, xCoor, yCoor, zCoor );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@ import appeng.api.AEApi;
|
|||
import appeng.api.IAppEngApi;
|
||||
import appeng.api.crafting.ICraftingPatternMAC;
|
||||
import appeng.api.implementations.ICraftingPatternItem;
|
||||
import appeng.api.implementations.ISpatialStorageCell;
|
||||
import appeng.api.implementations.IStorageComponent;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.items.ISpatialStorageCell;
|
||||
import appeng.api.implementations.items.IStorageComponent;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.api.storage.ICellWorkbenchItem;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import appeng.api.definitions.Blocks;
|
|||
import appeng.api.definitions.Items;
|
||||
import appeng.api.definitions.Materials;
|
||||
import appeng.api.definitions.Parts;
|
||||
import appeng.api.implementations.ITileStorageMonitorable;
|
||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.networking.pathing.IPathingGrid;
|
||||
import appeng.api.networking.spatial.ISpatialCache;
|
||||
|
|
|
@ -3,7 +3,7 @@ package appeng.core.features.registries.entries;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import appeng.api.implementations.IChestOrDrive;
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.storage.ICellHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
|
|
|
@ -3,7 +3,7 @@ package appeng.core.features.registries.entries;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import appeng.api.implementations.IChestOrDrive;
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.storage.ICellHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
|
|
|
@ -9,7 +9,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.exceptions.AppEngException;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
|
@ -30,10 +33,7 @@ import appeng.container.implementations.ContainerNetworkTool;
|
|||
import appeng.container.implementations.ContainerQNB;
|
||||
import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.container.implementations.ContainerVibrationChamber;
|
||||
import appeng.helpers.ICellItemViewer;
|
||||
import appeng.helpers.IGuiItem;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import appeng.helpers.INetworkTool;
|
||||
import appeng.parts.automation.PartLevelEmitter;
|
||||
import appeng.tile.grindstone.TileGrinder;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
|
@ -59,7 +59,7 @@ public enum GuiBridge implements IGuiHandler
|
|||
|
||||
GUI_ME(ContainerMEMonitorable.class, IStorageMonitorable.class, false),
|
||||
|
||||
GUI_PORTABLE_CELL(ContainerMEPortableCell.class, ICellItemViewer.class, true),
|
||||
GUI_PORTABLE_CELL(ContainerMEPortableCell.class, IPortableCell.class, true),
|
||||
|
||||
GUI_NETWORK_STATUS(ContainerNetworkStatus.class, INetworkTool.class, true),
|
||||
|
||||
|
@ -73,7 +73,7 @@ public enum GuiBridge implements IGuiHandler
|
|||
|
||||
GUI_INTERFACE(ContainerInterface.class, IInterfaceHost.class, false),
|
||||
|
||||
GUI_BUS(ContainerUpgradeable.class, IBusCommon.class, false),
|
||||
GUI_BUS(ContainerUpgradeable.class, IUpgradeableHost.class, false),
|
||||
|
||||
GUI_IOPORT(ContainerIOPort.class, TileIOPort.class, false),
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.implementations.ISegmentedInventory;
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package appeng.helpers;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
public interface ICellItemViewer extends IStorageMonitorable, IMEMonitor<IAEItemStack>, IEnergySource
|
||||
{
|
||||
|
||||
public ItemStack getItemStack();
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package appeng.helpers;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IGuiItem
|
||||
{
|
||||
|
||||
Object getGuiObject(ItemStack is, World world, int x, int y, int z);
|
||||
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package appeng.helpers;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
public interface INetworkTool extends IInventory
|
||||
{
|
||||
|
||||
IGridHost getGridHost(); // null for most purposes.
|
||||
|
||||
public ItemStack getItemStack();
|
||||
|
||||
}
|
|
@ -2,19 +2,20 @@ package appeng.helpers;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class NetworkToolInv implements INetworkTool
|
||||
public class NetworkToolViewer implements INetworkTool
|
||||
{
|
||||
|
||||
final AppEngInternalInventory inv;
|
||||
final ItemStack is;
|
||||
final IGridHost gh;
|
||||
|
||||
public NetworkToolInv(ItemStack is, IGridHost gHost) {
|
||||
public NetworkToolViewer(ItemStack is, IGridHost gHost) {
|
||||
this.is = is;
|
||||
gh = gHost;
|
||||
inv = new AppEngInternalInventory( null, 9 );
|
|
@ -3,20 +3,21 @@ package appeng.helpers;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.MEMonitorHandler;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.me.storage.CellInventory;
|
||||
|
||||
public class CellItemViewer extends MEMonitorHandler<IAEItemStack> implements ICellItemViewer
|
||||
public class PortableCellViewer extends MEMonitorHandler<IAEItemStack> implements IPortableCell
|
||||
{
|
||||
|
||||
private ItemStack target;
|
||||
private IAEItemPowerStorage ips;
|
||||
|
||||
public CellItemViewer(ItemStack is) {
|
||||
public PortableCellViewer(ItemStack is) {
|
||||
super( CellInventory.getCell( is ) );
|
||||
ips = (IAEItemPowerStorage) is.getItem();
|
||||
target = is;
|
|
@ -20,9 +20,9 @@ import net.minecraft.util.Icon;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IItemGroup;
|
||||
import appeng.api.implementations.IStorageComponent;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.items.IItemGroup;
|
||||
import appeng.api.implementations.items.IStorageComponent;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.core.Configuration;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.AEFeatureHandler;
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.IItemGroup;
|
||||
import appeng.api.implementations.items.IItemGroup;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartItem;
|
||||
import appeng.core.Configuration;
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.implementations.IItemGroup;
|
||||
import appeng.api.implementations.IStorageCell;
|
||||
import appeng.api.implementations.items.IItemGroup;
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import appeng.api.implementations.IMemoryCard;
|
||||
import appeng.api.implementations.MemoryCardMessages;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.implementations.items.MemoryCardMessages;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.items.AEBaseItem;
|
||||
|
|
|
@ -8,12 +8,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.IAEWrench;
|
||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
import appeng.api.implementations.items.IAEWrench;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.IGuiItem;
|
||||
import appeng.helpers.NetworkToolInv;
|
||||
import appeng.helpers.NetworkToolViewer;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.util.Platform;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
@ -32,7 +32,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
|
|||
public Object getGuiObject(ItemStack is, World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity te = world.getBlockTileEntity( x, y, z );
|
||||
return new NetworkToolInv( is, (IGridHost) (te instanceof IGridHost ? te : null) );
|
||||
return new NetworkToolViewer( is, (IGridHost) (te instanceof IGridHost ? te : null) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ import appeng.api.AEApi;
|
|||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IStorageCell;
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.networking.security.PlayerSource;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
|
|
|
@ -11,15 +11,15 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.implementations.IStorageCell;
|
||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.CellItemViewer;
|
||||
import appeng.helpers.IGuiItem;
|
||||
import appeng.helpers.PortableCellViewer;
|
||||
import appeng.items.storage.CellConfig;
|
||||
import appeng.items.storage.CellUpgrades;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
|
@ -149,6 +149,6 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
|||
@Override
|
||||
public Object getGuiObject(ItemStack is, World w, int x, int y, int z)
|
||||
{
|
||||
return new CellItemViewer( is );
|
||||
return new PortableCellViewer( is );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.util.Platform;
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.IAEWrench;
|
||||
import appeng.api.implementations.items.IAEWrench;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.items.AEBaseItem;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
|
|
@ -3,7 +3,7 @@ package appeng.me.storage;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.ITileStorageMonitorable;
|
||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||
import appeng.api.storage.IExternalStorageHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.exceptions.AppEngException;
|
||||
import appeng.api.implementations.IStorageCell;
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.IncludeExclude;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
|
|
|
@ -2,7 +2,7 @@ package appeng.me.storage;
|
|||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.implementations.IChestOrDrive;
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.ICellHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
|
|
|
@ -19,7 +19,7 @@ import net.minecraft.util.Vec3;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.parts.IPart;
|
||||
|
@ -35,7 +35,7 @@ import appeng.me.helpers.AENetworkProxy;
|
|||
import appeng.me.helpers.IGridProxyable;
|
||||
import appeng.parts.networking.PartCable;
|
||||
|
||||
public class AEBasePart implements IPart, IGridProxyable, IGridHost, IBusCommon
|
||||
public class AEBasePart implements IPart, IGridProxyable, IGridHost, IUpgradeableHost
|
||||
{
|
||||
|
||||
protected AENetworkProxy proxy;
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import powercrystals.minefactoryreloaded.api.rednet.RedNetConnectionType;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.IPartCable;
|
||||
import appeng.api.implementations.parts.IPartCable;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.ISegmentedInventory;
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.parts.PartBasicState;
|
||||
import appeng.tile.inventory.IAEAppEngInventory;
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeModule;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.tile.inventory.IAEAppEngInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.ISegmentedInventory;
|
||||
import appeng.api.implementations.ITileStorageMonitorable;
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.IPartCable;
|
||||
import appeng.api.implementations.parts.IPartCable;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.IGridConnection;
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import appeng.api.AEApi;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.api.implementations.IMemoryCard;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartCollsionHelper;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.IPartMonitor;
|
||||
import appeng.api.implementations.parts.IPartMonitor;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import appeng.api.implementations.IPartStorageMonitor;
|
||||
import appeng.api.implementations.parts.IPartStorageMonitor;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.storage.IStackWatcher;
|
||||
import appeng.api.networking.storage.IStackWatcherHost;
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.ICrankable;
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.events.AETileEventHandler;
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.features.IGrinderEntry;
|
||||
import appeng.api.implementations.ICrankable;
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.WorldCoord;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.storage.ICellWorkbenchItem;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
@ -17,7 +17,7 @@ import appeng.tile.inventory.AppEngInternalInventory;
|
|||
import appeng.tile.inventory.IAEAppEngInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
|
||||
public class TileCellWorkbench extends AEBaseTile implements IBusCommon, IAEAppEngInventory
|
||||
public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, IAEAppEngInventory
|
||||
{
|
||||
|
||||
AppEngInternalInventory cell = new AppEngInternalInventory( this, 1 );
|
||||
|
|
|
@ -15,8 +15,8 @@ import appeng.api.AEApi;
|
|||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.ICrankable;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.me.GridAccessException;
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraftforge.fluids.IFluidHandler;
|
|||
import appeng.api.AEApi;
|
||||
import appeng.api.config.CondenserOuput;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.implementations.IStorageComponent;
|
||||
import appeng.api.implementations.items.IStorageComponent;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigureableObject;
|
||||
import appeng.tile.AEBaseInvTile;
|
||||
|
|
|
@ -7,8 +7,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.implementations.ISegmentedInventory;
|
||||
import appeng.api.implementations.ITileStorageMonitorable;
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
|
|
|
@ -20,7 +20,7 @@ import appeng.api.AEApi;
|
|||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.IMEChest;
|
||||
import appeng.api.implementations.tiles.IMEChest;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.networking.events.MENetworkCellArrayUpdate;
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.IChestOrDrive;
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.events.MENetworkCellArrayUpdate;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
|
|
|
@ -13,7 +13,7 @@ import appeng.api.config.OperationMode;
|
|||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IBusCommon;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
|
@ -45,7 +45,7 @@ import appeng.util.Platform;
|
|||
import appeng.util.inv.WrapperInventoryRange;
|
||||
import appeng.util.item.ItemList;
|
||||
|
||||
public class TileIOPort extends AENetworkInvTile implements IBusCommon, IConfigManagerHost, IGridTickable
|
||||
public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost, IGridTickable
|
||||
{
|
||||
|
||||
ConfigManager cm = new ConfigManager( this );
|
||||
|
|
|
@ -50,9 +50,9 @@ import appeng.api.config.AccessRestriction;
|
|||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.IAEWrench;
|
||||
import appeng.api.implementations.ITileStorageMonitorable;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.api.implementations.items.IAEWrench;
|
||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.storage.IStorageGrid;
|
||||
|
|
Loading…
Reference in a new issue