OSDN Git Service

バグ特定ができないのでコミットしとく
authormozipi <mozipi@users.sourceforge.jp>
Tue, 11 Dec 2012 13:35:54 +0000 (22:35 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Tue, 11 Dec 2012 13:35:54 +0000 (22:35 +0900)
12 files changed:
common/chemicraft/AtomInfo.java
common/chemicraft/Auxiliary.java
common/chemicraft/BlockScienceCraftingTable.java
common/chemicraft/ChemiCraft.java
common/chemicraft/ChemiCraftAPI.java
common/chemicraft/CommonProxy.java
common/chemicraft/ContainerScienceCraftingTable.java
common/chemicraft/GuiScienceCraftingTable.java
common/chemicraft/InventoryDecomposition.java [new file with mode: 0644]
common/chemicraft/PacketHandler.java
common/chemicraft/TileEntityScienceCraftingTable.java
src/chemicraft/client/ClientProxy.java

index 264b35a..fe14547 100644 (file)
@@ -4,6 +4,12 @@ import net.minecraft.src.EntityPlayer;
 import net.minecraft.src.ItemStack;\r
 import net.minecraft.src.World;\r
 \r
+/**\r
+ * いろいろなデータを格納しメソッドによってチェックするクラス\r
+ * 使用する場合はItemAtomInfoContainerを継承することを推奨\r
+ * @author ponkotate\r
+ *\r
+ */\r
 public class AtomInfo {\r
 \r
        /**\r
index a68d2e5..429d931 100644 (file)
@@ -7,6 +7,11 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
 \r
 public class Auxiliary {\r
 \r
+       /**\r
+        * 補助クラス\r
+        * @author mozipi\r
+        *\r
+        */\r
        class NameAuxiliary {\r
 \r
                /**\r
index b03ac5c..1a439d1 100644 (file)
@@ -1,6 +1,5 @@
 package chemicraft;
 
-import cpw.mods.fml.common.Mod;
 import net.minecraft.src.BlockContainer;
 import net.minecraft.src.CreativeTabs;
 import net.minecraft.src.EntityPlayer;
@@ -19,7 +18,7 @@ public class BlockScienceCraftingTable extends BlockContainer {
 
        @Override
        public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
-               par5EntityPlayer.openGui(ChemiCraft.instance, ChemiCraft.guiScienceCraftingTableID, par1World, par2, par3, par4);
+               par5EntityPlayer.openGui(ChemiCraft.instance, ChemiCraft.instance.guiScienceCraftingTableID, par1World, par2, par3, par4);
                return true;
        }
 
index a55a8de..2220c75 100644 (file)
@@ -15,9 +15,14 @@ import cpw.mods.fml.common.network.NetworkMod;
 import cpw.mods.fml.common.network.NetworkRegistry;\r
 import cpw.mods.fml.common.registry.GameRegistry;\r
 \r
+/**\r
+ * ChemiCraft本体\r
+ * @author P.C.C.\r
+ *\r
+ */\r
 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")\r
 // ID,名前,バージョン\r
-@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class)\r
+@NetworkMod(clientSideRequired = true, serverSideRequired = false, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class)\r
 // クライアント、サーバー共に必要 1.3.2用\r
 public class ChemiCraft {\r
 \r
index 8e215d6..646c5ee 100644 (file)
@@ -2,6 +2,12 @@ package chemicraft;
 
 import java.util.ArrayList;
 
+/**
+ * ChemiCraftのAPI
+ * 基本的にAddonはこのクラスのインスタンスを使う
+ * @author mozipi
+ *
+ */
 public class ChemiCraftAPI {
 
        /**
@@ -33,7 +39,6 @@ public class ChemiCraftAPI {
         */
        private static ArrayList<ICompoundHandler> compoundHandlers = new ArrayList<ICompoundHandler>();
 
-
        /**
         * List of item name of handler to compounds.
         */
index f827ab2..a17cad0 100644 (file)
@@ -7,27 +7,26 @@ import cpw.mods.fml.common.network.IGuiHandler;
 
 public class CommonProxy implements IGuiHandler {
 
-    public void registerRenderInformation() {
-    }
-
+       public void registerRenderInformation() {
+       }
 
-    @Override
-    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
-       if (!world.blockExists(x, y, z))
-           return null;
 
-       TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
+       @Override
+       public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+               if (!world.blockExists(x, y, z))
+                       return null;
 
-       if (tileEntity instanceof TileEntityScienceCraftingTable) {
-           return new ContainerScienceCraftingTable(player.inventory, (TileEntityScienceCraftingTable) tileEntity);
+               TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
+               if (tileEntity instanceof TileEntityScienceCraftingTable) {
+                       return new ContainerScienceCraftingTable(player, (TileEntityScienceCraftingTable) tileEntity);
+               }
+               return null;
        }
-       return null;
-    }
 
 
-    @Override
-    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
-       return null;
-    }
+       @Override
+       public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+               return null;
+       }
 
 }
\ No newline at end of file
index 9a3d2c7..d9204a7 100644 (file)
@@ -1,9 +1,11 @@
 package chemicraft;
 
+import cpw.mods.fml.common.network.PacketDispatcher;
 import net.minecraft.src.Container;
 import net.minecraft.src.EntityPlayer;
 import net.minecraft.src.IInventory;
 import net.minecraft.src.InventoryPlayer;
+import net.minecraft.src.Item;
 import net.minecraft.src.ItemStack;
 import net.minecraft.src.Slot;
 import net.minecraft.src.World;
@@ -25,12 +27,35 @@ public class ContainerScienceCraftingTable extends Container {
 
 
 
-       public ContainerScienceCraftingTable(InventoryPlayer par1InventoryPlayer, TileEntityScienceCraftingTable par2)
+       public ContainerScienceCraftingTable(EntityPlayer par1EntityPlayer, TileEntityScienceCraftingTable par2)
        {
                this.worldObj = par2.worldObj;
                this.posX = par2.xCoord;
                this.posY = par2.yCoord;
                this.posZ = par2.zCoord;
+               //GenerateInventory
+               this.generateSlots(par2.getActiveTab(), par2.getActiveInventory());
+               System.out.println("----------------------------------------------------------------------------------");
+               if(par2.getActiveInventory() != null){
+                       for(int i = 0;i < par2.getActiveInventory().getSizeInventory();i++){
+                               System.out.println(par2.getActiveInventory().getStackInSlot(i));
+                       }
+               }
+               //GeneratePlayerInventory
+               int var3;
+
+               for (var3 = 0; var3 < 3; ++var3)
+               {
+                       for (int var4 = 0; var4 < 9; ++var4)
+                       {
+                               this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var4 + var3 * 9 + 9, 8 + var4 * 18, 85 + var3 * 18));
+                       }
+               }
+
+               for (var3 = 0; var3 < 9; ++var3)
+               {
+                       this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var3, 8 + var3 * 18, 143));
+               }
        }
 
 
@@ -59,4 +84,19 @@ public class ContainerScienceCraftingTable extends Container {
                return null;
        }
 
+       private void generateSlots(String activeTabs, IInventory inventory){
+               if(activeTabs.equals("Decomposition")){
+                       int count = 0;
+                       for(int i = 0;i < 4;i++){
+                               for(int j = 0;j < 4;j++){
+                                       this.addSlotToContainer(new Slot(inventory, count, 90 + 18 * j, 8 + 18 * i));
+                                       count++;
+                               }
+                       }
+                       this.addSlotToContainer(new Slot(inventory, count, 25 + 4, 26 + 4));
+               }else{
+                       return;
+               }
+       }
+
 }
index 6f6ccf9..fdac6c0 100644 (file)
@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 
 import net.minecraft.src.Block;
+import net.minecraft.src.EntityPlayer;
 import net.minecraft.src.GuiContainer;
 import net.minecraft.src.InventoryBasic;
 import net.minecraft.src.InventoryPlayer;
@@ -41,17 +42,23 @@ public class GuiScienceCraftingTable extends GuiContainer {
        private HashMap<String, Integer> otherImageMap = new HashMap<String, Integer>();
 
 
-
        /**
         * the TileEntity.
         */
        private TileEntityScienceCraftingTable tileEntity;
 
 
+       /**
+        * the InventoryPlayer.
+        */
+       private InventoryPlayer inventoryPlayer;
+
+
 
-       public GuiScienceCraftingTable(InventoryPlayer par1InventoryPlayer, TileEntityScienceCraftingTable par2){
-               super(new ContainerScienceCraftingTable(par1InventoryPlayer, par2));
+       public GuiScienceCraftingTable(EntityPlayer par1EntityPlayer, TileEntityScienceCraftingTable par2){
+               super(new ContainerScienceCraftingTable(par1EntityPlayer, par2));
                //TileEntityを設定
+               this.inventoryPlayer = par1EntityPlayer.inventory;
                this.tileEntity = par2;
                //TabListにTabを追加する
                this.addTabs(0, "Decomposition", new ItemStack(Block.tnt.blockID, 1, 1));
@@ -78,6 +85,8 @@ public class GuiScienceCraftingTable extends GuiContainer {
                        String var3 = this.tabList.get(var1 / 28).getTabName();
                        if(!var3.equals(this.tileEntity.getActiveTab())){
                                this.tileEntity.setActiveTab(var3);
+                               this.inventoryPlayer.player.openGui(ChemiCraft.instance, ChemiCraft.instance.guiScienceCraftingTableID, this.tileEntity.worldObj, this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord);
+                               this.onGuiClosed();
                        }
                }
        }
@@ -125,9 +134,9 @@ public class GuiScienceCraftingTable extends GuiContainer {
 
        private void func_00002(){
                //guiImageMapに画像を格納する
-               guiImageMap.put("Decomposition", this.mc.renderEngine.getTexture("/ChemiCraft/guis/Decomposition.png"));
+               guiImageMap.put("Decomposition", this.mc.renderEngine.getTexture("/resources/chemicraft/guis/Decomposition.png"));
                //otherImageMapに画像を格納する
-               otherImageMap.put("tabs", this.mc.renderEngine.getTexture("/ChemiCraft/guis/tabs.png"));
+               otherImageMap.put("tabs", this.mc.renderEngine.getTexture("/resources/chemicraft/guis/tabs.png"));
        }
 
 
diff --git a/common/chemicraft/InventoryDecomposition.java b/common/chemicraft/InventoryDecomposition.java
new file mode 100644 (file)
index 0000000..d3e695c
--- /dev/null
@@ -0,0 +1,86 @@
+package chemicraft;
+
+import net.minecraft.src.EntityPlayer;
+import net.minecraft.src.IInventory;
+import net.minecraft.src.ItemStack;
+
+public class InventoryDecomposition implements IInventory {
+
+       private ItemStack[] inventory = new ItemStack[16+1];
+
+       @Override
+       public int getSizeInventory() {
+               return inventory.length;
+       }
+
+       @Override
+       public ItemStack getStackInSlot(int var1) {
+               return inventory[var1];
+       }
+
+       @Override
+       public ItemStack decrStackSize(int par1, int par2)
+       {
+               if (this.inventory[par1] != null)
+               {
+                       ItemStack var3 = this.inventory[par1];
+                       this.inventory[par1] = null;
+                       return var3;
+               }
+               else
+               {
+                       return null;
+               }
+       }
+
+       @Override
+       public ItemStack getStackInSlotOnClosing(int par1)
+       {
+               if (this.inventory[par1] != null)
+               {
+                       ItemStack var2 = this.inventory[par1];
+                       this.inventory[par1] = null;
+                       return var2;
+               }
+               else
+               {
+                       return null;
+               }
+       }
+
+       @Override
+       public void setInventorySlotContents(int var1, ItemStack var2) {
+               inventory[var1] = var2;
+       }
+
+       @Override
+       public String getInvName() {
+               return "DecompositionInventory";
+       }
+
+       @Override
+       public int getInventoryStackLimit() {
+               return 64;
+       }
+
+       @Override
+       public void onInventoryChanged() {
+
+       }
+
+       @Override
+       public boolean isUseableByPlayer(EntityPlayer var1) {
+               return true;
+       }
+
+       @Override
+       public void openChest() {
+
+       }
+
+       @Override
+       public void closeChest() {
+
+       }
+
+}
index e46debf..d03f227 100644 (file)
@@ -19,80 +19,71 @@ import cpw.mods.fml.common.network.Player;
 \r
 /**\r
  * サーバーとクライアントのデータの同期に必要なクラス\r
- * \r
+ *\r
  * @author Lilly\r
- * \r
+ *\r
  */\r
 public class PacketHandler implements IPacketHandler {\r
 \r
-    @Override\r
-    public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) {\r
-       if (packet.channel.equals("chemicraft")) {\r
-           ByteArrayDataInput var1 = ByteStreams.newDataInput(packet.data);\r
-\r
-           World world;\r
-           TileEntity tileEntity;\r
-           TileEntityScienceCraftingTable var2;\r
-\r
-           // TileEntityのx, y, z座標\r
-           int x, y, z;\r
-\r
-           // activeTab\r
-           String activeTab;\r
-\r
-           // 座標読み込み\r
-           x = var1.readInt();\r
-           y = var1.readInt();\r
-           z = var1.readInt();\r
-           // activeTab読み込み\r
-           activeTab = var1.readUTF();\r
-\r
-           // from Client to Server\r
-           world = ((EntityPlayer) player).worldObj;\r
-           tileEntity = world.getBlockTileEntity(x, y, z);\r
-           if (tileEntity instanceof TileEntityScienceCraftingTable) {\r
-               var2 = (TileEntityScienceCraftingTable) tileEntity;\r
-               var2.handlePacket(new Object[] { activeTab });\r
-           }\r
+       @Override\r
+       public void onPacketData(NetworkManager manager, Packet250CustomPayload packet, Player player) {\r
+               if (packet.channel.equals("chemicraft")) {\r
+                       ByteArrayDataInput var1 = ByteStreams.newDataInput(packet.data);\r
+\r
+                       World world;\r
+                       TileEntity tileEntity;\r
+                       TileEntityScienceCraftingTable var2;\r
+\r
+                       // TileEntityのx, y, z座標\r
+                       int x, y, z;\r
+\r
+                       // 座標読み込み\r
+                       x = var1.readInt();\r
+                       y = var1.readInt();\r
+                       z = var1.readInt();\r
+\r
+                       // from Client to Server\r
+                       world = ((EntityPlayer) player).worldObj;\r
+                       tileEntity = world.getBlockTileEntity(x, y, z);\r
+                       if (tileEntity instanceof TileEntityScienceCraftingTable) {\r
+                               var2 = (TileEntityScienceCraftingTable) tileEntity;\r
+                               var2.readPacket(var1);\r
+                       }\r
+               }\r
        }\r
-    }\r
 \r
 \r
-    public static Packet getPacket(TileEntityScienceCraftingTable tileEntity) {\r
-       ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
-       DataOutputStream var2 = new DataOutputStream(var1);\r
-\r
-       // Blockのx, y, z座標\r
-       int x, y, z;\r
-\r
-       // activeTab\r
-       String activeTab;\r
-\r
-       // x, y, z座標を代入\r
-       x = tileEntity.xCoord;\r
-       y = tileEntity.yCoord;\r
-       z = tileEntity.zCoord;\r
-\r
-       // activeTabに代入\r
-       activeTab = tileEntity.getActiveTab();\r
-\r
-       try {\r
-           // 座標書き込み\r
-           var2.writeInt(x);\r
-           var2.writeInt(y);\r
-           var2.writeInt(z);\r
-           // activeTab書き込み\r
-           var2.writeUTF(activeTab);\r
-       } catch (IOException e) {\r
-           e.printStackTrace();\r
+       public static Packet getPacket(TileEntityScienceCraftingTable tileEntity) {\r
+               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
+               DataOutputStream var2 = new DataOutputStream(var1);\r
+\r
+               // Blockのx, y, z座標\r
+               int x, y, z;\r
+\r
+               // activeTab\r
+               String activeTab;\r
+\r
+               // x, y, z座標を代入\r
+               x = tileEntity.xCoord;\r
+               y = tileEntity.yCoord;\r
+               z = tileEntity.zCoord;\r
+\r
+               try {\r
+                       // 座標書き込み\r
+                       var2.writeInt(x);\r
+                       var2.writeInt(y);\r
+                       var2.writeInt(z);\r
+                       tileEntity.writePacket(var2);\r
+               } catch (IOException e) {\r
+                       e.printStackTrace();\r
+               }\r
+\r
+               // パケットの作成\r
+               Packet250CustomPayload packet = new Packet250CustomPayload();\r
+               packet.channel = "chemicraft";\r
+               packet.data = var1.toByteArray();\r
+               packet.length = var1.size();\r
+               packet.isChunkDataPacket = true;\r
+               return packet;\r
        }\r
-\r
-       // パケットの作成\r
-       Packet250CustomPayload packet = new Packet250CustomPayload();\r
-       packet.channel = "chemicraft";\r
-       packet.data = var1.toByteArray();\r
-       packet.length = var1.size();\r
-       packet.isChunkDataPacket = true;\r
-       return packet;\r
-    }\r
 }\r
index 515d7fa..d824437 100644 (file)
 package chemicraft;
 
-import cpw.mods.fml.common.network.PacketDispatcher;
+import java.io.DataOutputStream;
+
 import net.minecraft.src.EntityPlayer;
 import net.minecraft.src.IInventory;
 import net.minecraft.src.ItemStack;
 import net.minecraft.src.NBTTagCompound;
+import net.minecraft.src.NBTTagList;
 import net.minecraft.src.Packet;
 import net.minecraft.src.TileEntity;
 import net.minecraftforge.common.ForgeDirection;
 import net.minecraftforge.common.ISidedInventory;
 
-public class TileEntityScienceCraftingTable extends TileEntity implements IInventory, ISidedInventory {
-
-    /**
-     * InventorySlotのItemStack配列
-     */
-    private ItemStack[] inventory = new ItemStack[17];
-
-    /**
-     * ActiveなTabの名前
-     */
-    private String activeTab;
-
-
-    public TileEntityScienceCraftingTable() {
-       super();
-       // ActiveTabのデフォルトを設定
-       this.activeTab = "Decomposition";
-    }
-
-
-    @Override
-    public void updateEntity() {
-       super.updateEntity();
-    }
-
-
-    @Override
-    public void readFromNBT(NBTTagCompound par1) {
-       super.readFromNBT(par1);
-       this.activeTab = par1.getString("activeTab");
-    }
-
-
-    @Override
-    public void writeToNBT(NBTTagCompound par1) {
-       super.writeToNBT(par1);
-       par1.setString("activeTab", this.activeTab);
-    }
-
-
-    public String getActiveTab() {
-       return this.activeTab;
-    }
+import com.google.common.io.ByteArrayDataInput;
 
+import cpw.mods.fml.common.network.PacketDispatcher;
 
-    public void setActiveTab(String activeTab) {
-       this.activeTab = activeTab;
-       PacketDispatcher.sendPacketToServer(getDescriptionPacket());
-    }
+public class TileEntityScienceCraftingTable extends TileEntity {
 
+       /**
+        * DecompositionのInventory
+        */
+       private IInventory decompositionInv = new InventoryDecomposition();
 
-    @Override
-    public int getSizeInventory() {
-       return inventory.length;
-    }
+       /**
+        * ActiveなTabの名前
+        */
+       private String activeTab;
 
 
-    @Override
-    public ItemStack getStackInSlot(int var1) {
-       return inventory[var1];
-    }
+       public TileEntityScienceCraftingTable() {
+               super();
+               // ActiveTabのデフォルトを設定
+               this.activeTab = "Decomposition";
+       }
 
 
-    @Override
-    public ItemStack decrStackSize(int var1, int var2) {
-       return null;
-    }
+       @Override
+       public void updateEntity() {
+               super.updateEntity();
+       }
 
 
-    @Override
-    public ItemStack getStackInSlotOnClosing(int var1) {
-       return null;
-    }
+       @Override
+       public void readFromNBT(NBTTagCompound par1) {
+               super.readFromNBT(par1);
 
+               this.activeTab = par1.getString("activeTab");
 
-    @Override
-    public void setInventorySlotContents(int var1, ItemStack var2) {
-    }
+               NBTTagList var2 = par1.getTagList("Items");
+               for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+               {
+                       NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
+                       int var5 = var4.getByte("Slot") & 255;
 
+                       if (var5 >= 0 && var5 < this.decompositionInv.getSizeInventory())
+                       {
+                               this.decompositionInv.setInventorySlotContents(var5, ItemStack.loadItemStackFromNBT(var4));
+                       }
+               }
+       }
 
-    @Override
-    public String getInvName() {
-       return null;
-    }
 
+       @Override
+       public void writeToNBT(NBTTagCompound par1) {
+               super.writeToNBT(par1);
 
-    @Override
-    public int getInventoryStackLimit() {
-       return 64;
-    }
+               par1.setString("activeTab", this.activeTab);
 
+               NBTTagList var2 = new NBTTagList();
+               for (int var3 = 0; var3 < this.decompositionInv.getSizeInventory(); ++var3)
+               {
+                       if (this.decompositionInv.getStackInSlot(var3) != null)
+                       {
+                               NBTTagCompound var4 = new NBTTagCompound();
+                               var4.setByte("Slot", (byte)var3);
+                               this.decompositionInv.getStackInSlot(var3).writeToNBT(var4);
+                               var2.appendTag(var4);
+                       }
+               }
+               par1.setTag("Items", var2);
+       }
 
-    @Override
-    public boolean isUseableByPlayer(EntityPlayer var1) {
-       return false;
-    }
 
+       public String getActiveTab() {
+               return this.activeTab;
+       }
 
-    @Override
-    public void openChest() {
-    }
 
+       public void setActiveTab(String activeTab) {
+               this.activeTab = activeTab;
+               PacketDispatcher.sendPacketToServer(this.getDescriptionPacket());
+       }
 
-    @Override
-    public void closeChest() {
-    }
 
+       public IInventory getActiveInventory(){
+               if(this.activeTab.equals("Decomposition")){
+                       return this.decompositionInv;
+               }else{
+                       return null;
+               }
+       }
 
-    @Override
-    public Packet getDescriptionPacket() {
-       return PacketHandler.getPacket(this);
-    }
 
+       @Override
+       public Packet getDescriptionPacket() {
+               return PacketHandler.getPacket(this);
+       }
 
-    public void handlePacket(Object[] data) {
-       this.activeTab = (String) data[0];
-    }
 
+       public void readPacket(ByteArrayDataInput data) {
+               try {
+                       this.activeTab = data.readUTF();
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+       }
 
-    @Override
-    public int getStartInventorySide(ForgeDirection side) {
-       return 0;
-    }
 
+       public void writePacket(DataOutputStream dos){
+               try {
+                       dos.writeUTF(this.activeTab);
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+       }
 
-    @Override
-    public int getSizeInventorySide(ForgeDirection side) {
-       return 0;
-    }
 }
index 6c0538f..0399f32 100644 (file)
@@ -10,22 +10,20 @@ import cpw.mods.fml.client.FMLClientHandler;
 
 public class ClientProxy extends CommonProxy {
 
-    @Override
-    public void registerRenderInformation() {
-    }
-
-
-    @Override
-    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
-       if (!world.blockExists(x, y, z))
-           return null;
+       @Override
+       public void registerRenderInformation() {
+       }
 
-       TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
+       @Override
+       public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
+               if (!world.blockExists(x, y, z))
+                       return null;
 
-       if (tileEntity instanceof TileEntityScienceCraftingTable) {
-           return new GuiScienceCraftingTable(player.inventory, (TileEntityScienceCraftingTable) tileEntity);
+               TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
+               if (tileEntity instanceof TileEntityScienceCraftingTable) {
+                       return new GuiScienceCraftingTable(player, (TileEntityScienceCraftingTable) tileEntity);
+               }
+               return null;
        }
-       return null;
-    }
 
 }