diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-02-19 17:38:35 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-02-19 17:38:35 +1000 |
commit | 7011e367ac5ccc34473283d6245bc2cec93b835e (patch) | |
tree | cc5675471f1101631bec2cde9713cb9c0004cc8f /src/Java/binnie/core/gui | |
parent | c68c67d74f39c3eb075ac29e88936a1976ef089b (diff) | |
download | GT5-Unofficial-7011e367ac5ccc34473283d6245bc2cec93b835e.tar.gz GT5-Unofficial-7011e367ac5ccc34473283d6245bc2cec93b835e.tar.bz2 GT5-Unofficial-7011e367ac5ccc34473283d6245bc2cec93b835e.zip |
Removed Hard dependency on gregtech as another Project and added dev versions of all requires libs.
Also started work on GT-EU EnderIO conduits, adding @Optional annotations where possible and a few other nice things.
Diffstat (limited to 'src/Java/binnie/core/gui')
-rw-r--r-- | src/Java/binnie/core/gui/BinnieCoreGUI.java | 54 | ||||
-rw-r--r-- | src/Java/binnie/core/gui/BinnieGUIHandler.java | 54 | ||||
-rw-r--r-- | src/Java/binnie/core/gui/IBinnieGUID.java | 13 |
3 files changed, 0 insertions, 121 deletions
diff --git a/src/Java/binnie/core/gui/BinnieCoreGUI.java b/src/Java/binnie/core/gui/BinnieCoreGUI.java deleted file mode 100644 index 50f99306f1..0000000000 --- a/src/Java/binnie/core/gui/BinnieCoreGUI.java +++ /dev/null @@ -1,54 +0,0 @@ -package binnie.core.gui; - -import binnie.core.machines.storage.WindowCompartment; -import binnie.craftgui.binniecore.WindowFieldKit; -import binnie.craftgui.binniecore.WindowGenesis; -import binnie.craftgui.minecraft.Window; -import cpw.mods.fml.relauncher.Side; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -public enum BinnieCoreGUI - implements IBinnieGUID -{ - Compartment, FieldKit, Genesis; - - private BinnieCoreGUI() {} - - public Window getWindow(EntityPlayer player, IInventory object, Side side) - throws Exception - { - switch (1.$SwitchMap$binnie$core$gui$BinnieCoreGUI[ordinal()]) - { - case 1: - return new WindowCompartment(player, object, side); - case 2: - return new WindowFieldKit(player, null, side); - case 3: - return new WindowGenesis(player, null, side); - } - return null; - } - - public Window getWindow(EntityPlayer player, World world, int x, int y, int z, Side side) - { - Window window = null; - TileEntity tileEntity = world.getTileEntity(x, y, z); - - IInventory object = null; - if ((tileEntity instanceof IInventory)) { - object = (IInventory)tileEntity; - } - try - { - window = getWindow(player, object, side); - } - catch (Exception e) - { - e.printStackTrace(); - } - return window; - } -} diff --git a/src/Java/binnie/core/gui/BinnieGUIHandler.java b/src/Java/binnie/core/gui/BinnieGUIHandler.java deleted file mode 100644 index c146d914e0..0000000000 --- a/src/Java/binnie/core/gui/BinnieGUIHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -package binnie.core.gui; - -import binnie.core.AbstractMod; -import binnie.core.BinnieCore; -import binnie.core.proxy.BinnieProxy; -import binnie.craftgui.minecraft.Window; -import cpw.mods.fml.common.network.IGuiHandler; -import cpw.mods.fml.relauncher.Side; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -public final class BinnieGUIHandler - implements IGuiHandler -{ - private AbstractMod mod; - - public BinnieGUIHandler(AbstractMod mod) - { - this.mod = mod; - } - - public final Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) - { - Window window = getWindow(id, player, world, x, y, z, Side.SERVER); - if (window == null) { - return null; - } - window.initialiseServer(); - - return window.getContainer(); - } - - public final Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) - { - if (BinnieCore.proxy.isSimulating(world)) { - return getServerGuiElement(id, player, world, x, y, z); - } - Window window = getWindow(id, player, world, x, y, z, Side.CLIENT); - if (window == null) { - return null; - } - return window.getGui(); - } - - public Window getWindow(int id, EntityPlayer player, World world, int x, int y, int z, Side side) - { - for (IBinnieGUID guid : this.mod.getGUIDs()) { - if (guid.ordinal() == id) { - return guid.getWindow(player, world, x, y, z, side); - } - } - return null; - } -} diff --git a/src/Java/binnie/core/gui/IBinnieGUID.java b/src/Java/binnie/core/gui/IBinnieGUID.java deleted file mode 100644 index be0fd174da..0000000000 --- a/src/Java/binnie/core/gui/IBinnieGUID.java +++ /dev/null @@ -1,13 +0,0 @@ -package binnie.core.gui; - -import binnie.core.network.IOrdinaled; -import binnie.craftgui.minecraft.Window; -import cpw.mods.fml.relauncher.Side; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -public abstract interface IBinnieGUID - extends IOrdinaled -{ - public abstract Window getWindow(EntityPlayer paramEntityPlayer, World paramWorld, int paramInt1, int paramInt2, int paramInt3, Side paramSide); -} |