OSDN Git Service

修正・変更
authorponkotate <ponkotate@users.sourceforge.jp>
Sun, 10 Feb 2013 09:13:44 +0000 (18:13 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sun, 10 Feb 2013 09:13:44 +0000 (18:13 +0900)
テクスチャの修正
分解機等のテクスチャをthis.blockIndexInTextureを使うように変更
電解機(未完)を再度追加
電解機のクラス名に変更有り

37 files changed:
common/chemicraft/ChemiCraft.java
common/chemicraft/ChemiCraftAPI.java
common/chemicraft/block/BlockChemicalCombinationTable.java
common/chemicraft/block/BlockChemicalCraftingTable.java
common/chemicraft/block/BlockElectrolysisTable.java
common/chemicraft/block/BlockPyrolysisTable.java
common/chemicraft/block/BlockToolAndWeaponCraftingTable.java
common/chemicraft/client/ClientProxy.java
common/chemicraft/compounds/CompoundDebug.java [deleted file]
common/chemicraft/container/ContainerChemicalCombinationTable.java
common/chemicraft/container/ContainerElectrolysis.java [deleted file]
common/chemicraft/container/ContainerElectrolysisTable.java
common/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
common/chemicraft/debug/DebugTick.java
common/chemicraft/gui/GuiChemicalCombinationTable.java
common/chemicraft/gui/GuiChemicalCraftingTable.java
common/chemicraft/gui/GuiElectrolysisTable.java
common/chemicraft/gui/GuiPyrolysisTable.java
common/chemicraft/gui/GuiToolAndWeaponCraftingTable.java
common/chemicraft/inventory/InventoryElectrolysisTableFuel.java [moved from common/chemicraft/inventory/InventoryElectrolysisFuel.java with 95% similarity]
common/chemicraft/inventory/InventoryElectrolysisTableMaterial.java [moved from common/chemicraft/inventory/InventoryElectrolysisMaterial.java with 95% similarity]
common/chemicraft/inventory/InventoryElectrolysisTableResult.java [moved from common/chemicraft/inventory/InventoryElectrolysisResult.java with 95% similarity]
common/chemicraft/inventory/InventoryPyrolysisTableMaterial.java
common/chemicraft/inventory/InventoryPyrolysisTableResult.java
common/chemicraft/item/ItemAtoms.java
common/chemicraft/item/ItemCompounds.java
common/chemicraft/item/ItemGasCollectingBottle.java
common/chemicraft/render/RenderAtomsGrenade.java
common/chemicraft/slot/SlotPyrolysisTableMaterial.java
common/chemicraft/slot/SlotPyrolysisTableResult.java
common/chemicraft/system/CommonProxy.java
common/chemicraft/system/PacketHandler.java
common/chemicraft/tileentity/TileEntityChemicalCombinationTable.java
common/chemicraft/tileentity/TileEntityElectrolysisTable.java
common/chemicraft/tileentity/TileEntityPyrolysisTable.java
common/chemicraft/tileentity/TileEntityToolAndWeaponCraftingTable.java
resources/chemicraft/blocks/cctable.png

index 7f8829a..87c0293 100644 (file)
@@ -2,18 +2,18 @@ package chemicraft;
 \r
 import net.minecraft.block.Block;\r
 import net.minecraft.block.material.Material;\r
-import net.minecraft.client.audio.SoundManager;\r
 import net.minecraft.creativetab.CreativeTabs;\r
 import net.minecraft.item.Item;\r
 import net.minecraft.item.ItemStack;\r
+import net.minecraftforge.common.BiomeManager;\r
 import net.minecraftforge.common.Configuration;\r
+import net.minecraftforge.common.DimensionManager;\r
 import net.minecraftforge.common.Property;\r
 import chemicraft.block.BlockChemicalCombinationTable;\r
 import chemicraft.block.BlockChemicalCraftingTable;\r
 import chemicraft.block.BlockElectrolysisTable;\r
 import chemicraft.block.BlockPyrolysisTable;\r
 import chemicraft.block.BlockToolAndWeaponCraftingTable;\r
-import chemicraft.compounds.CompoundDebug;\r
 import chemicraft.compounds.CompoundWater;\r
 import chemicraft.debug.CommandDeleteItem;\r
 import chemicraft.debug.CommandGenDebugRoom;\r
@@ -34,6 +34,7 @@ import chemicraft.util.Auxiliary.ArrayAuxiliary;
 import chemicraft.util.Auxiliary.NameAuxiliary;\r
 import chemicraft.util.CreativeTabAtoms;\r
 import chemicraft.util.NBTRecipeGrenade;\r
+import chemicraft.util.WorldProviderChemical;\r
 import cpw.mods.fml.common.Mod;\r
 import cpw.mods.fml.common.SidedProxy;\r
 import cpw.mods.fml.common.event.FMLPostInitializationEvent;\r
@@ -99,28 +100,28 @@ public class ChemiCraft {
         * BlockID.\r
         */\r
        public int pyrolysisTableID;\r
+       public int electrolysisTableID;\r
        public int chemicalConbinationTableID;\r
        public int toolAndWeaponCraftingTableID;\r
        public int chemicalCraftingTableID;\r
-       public int electrolysisTableID;\r
 \r
        /**\r
         * GUIID.\r
         */\r
        public int guiPyrolysisTableID;\r
+       public int guiElectrolysisTableID;\r
        public int guiChemicalCombinationTableID;\r
        public int guiToolAndWeaponCraftingTableID;\r
        public int guiChemicalCraftingTableID;\r
-       public int guiElectrolysisTableID;\r
 \r
        /**\r
         * Block型変数.\r
         */\r
        public Block blockPyrolysisTable;\r
+       public Block blockElectrolysisTable;\r
        public Block blockChemicalCombinationTable;\r
        public Block blockToolAndWeaponCraftingTable;\r
        public Block blockChemicalCraftingTable;\r
-       public Block blockElectrolysisTable;\r
 \r
        /**\r
         * Item型変数.\r
@@ -133,15 +134,15 @@ public class ChemiCraft {
        /**\r
         * このmodで使用するTextureのパス.\r
         */\r
-       public final String ITEM_ATOMS_TEXTURE = "/chemicraft/items/Atoms.png";\r
-       public final String ITEM_COMPOUNDS_TEXTURE = "/chemicraft/items/Compounds.png";\r
-       public final String ITEM_TEXTURE = "/chemicraft/items/items.png";\r
-       public final String BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE = "/chemicraft/blocks/cctable.png";\r
-       public final String GUI_PYROLYSIS_TEXTURE = "/chemicraft/guis/Pyrolysis.png";\r
-       public final String GUI_ELECTROLYSIS_TEXTURE = "/chemicraft/guis/Electrolysis.png";\r
-       public final String GUI_CHEMICALCOMBINATION_TEXTURE = "/chemicraft/guis/ChemicalCombination.png";\r
-       public final String GUI_TOOLANDWEAPONCRAFTING_TEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";\r
-       public final String GUI_CHEMICALCRAFTING_TEXTURE = "/chemicraft/guis/MaterialCrafting.png";\r
+       public final String ITEMATOMSTEXTURE = "/chemicraft/items/Atoms.png";\r
+       public final String ITEMCOMPOUNDSTEXTURE = "/chemicraft/items/Compounds.png";\r
+       public final String ITEMTEXTURE = "/chemicraft/items/items.png";\r
+       public final String BLOCKCHEMICALCRAFTINGTABLETEXTURE = "/chemicraft/blocks/cctable.png";\r
+       public final String GUIPYROLYSISTEXTURE = "/chemicraft/guis/Pyrolysis.png";\r
+       public final String GUIELECTROLYSISTEXTURE = "/chemicraft/guis/Electrolysis.png";\r
+       public final String GUICHEMICALCOMBINATIONTEXTURE = "/chemicraft/guis/ChemicalCombination.png";\r
+       public final String GUITOOLANDWEAPONCRAFTINGTEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";\r
+       public final String GUICHEMICALCRAFTINGTEXTURE = "/chemicraft/guis/MaterialCrafting.png";\r
 \r
        /**\r
         * このmodに必要な補助クラスのインスタンス.\r
@@ -159,10 +160,10 @@ public class ChemiCraft {
                cfg.load();\r
 \r
                Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);\r
-               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2401);\r
-               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2402);\r
-               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2403);\r
-               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTableID", 2404);\r
+               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);\r
+               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);\r
+               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);\r
+               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);\r
 \r
                Property atomsIDProp = cfg.getItem("AtomsID", 25000);\r
                Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);\r
@@ -170,26 +171,26 @@ public class ChemiCraft {
                Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);\r
 \r
                Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);\r
-               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);\r
-               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1002);\r
-               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1003);\r
-               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableID", 1004);\r
+               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);\r
+               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);\r
+               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);\r
+               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);\r
 \r
 \r
                this.pyrolysisTableID = pyrolysisTableIDProp.getInt();\r
+               this.electrolysisTableID = electrolysisTableIDProp.getInt();\r
                this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();\r
                this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();\r
                this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();\r
-               this.electrolysisTableID = electrolysisTableIDProp.getInt();\r
                this.atomsID = atomsIDProp.getInt();\r
                this.compoundsID = compoundsIDProp.getInt();\r
                this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
                this.atomGrenadeID = atomGrenadeIDProp.getInt();\r
                this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();\r
+               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();\r
                this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();\r
                this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();\r
                this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();\r
-               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();\r
 \r
                cfg.save();\r
        }\r
@@ -216,26 +217,26 @@ public class ChemiCraft {
                                setResistance(0.0F).\r
                                setStepSound(Block.soundStoneFootstep).\r
                                setBlockName("PyrolysisTable");\r
-               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 0, Material.ground).\r
+               this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 1, Material.ground).\r
                                setHardness(2.0F).\r
                                setResistance(0.0F).\r
                                setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ChemicalCombinationTable");\r
-               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 0, Material.ground).\r
+                               setBlockName("ElectrolysisTable");\r
+               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 2, Material.ground).\r
                                setHardness(2.0F).\r
                                setResistance(0.0F).\r
                                setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ToolAndWeaponCraftingTable");\r
-               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.chemicalCraftingTableID, 0, Material.ground).\r
+                               setBlockName("ChemicalCombinationTable");\r
+               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 3, Material.ground).\r
                                setHardness(2.0F).\r
                                setResistance(0.0F).\r
                                setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ChemicalCraftingTable");\r
-               this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 0, Material.ground).\r
+                               setBlockName("ToolAndWeaponCraftingTable");\r
+               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(chemicalCraftingTableID, 4, Material.ground).\r
                                setHardness(2.0F).\r
                                setResistance(0.0F).\r
                                setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ElectrolysisTable");\r
+                               setBlockName("ChemicalCraftingTable");\r
 \r
                // Itemを追加します\r
                this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");\r
@@ -245,22 +246,22 @@ public class ChemiCraft {
 \r
                // BlockをMinecraftに登録します\r
                GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");\r
+               GameRegistry.registerBlock(this.blockElectrolysisTable, "ElectrolysisTable");\r
                GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");\r
                GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");\r
                GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");\r
-               GameRegistry.registerBlock(this.blockElectrolysisTable, "BlockElectrolysisTable");\r
 \r
                // Blockの名前を設定します\r
                this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");\r
                this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");\r
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");\r
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");\r
-               this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");\r
-               this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");\r
-               this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ChemicalCraftingTable");\r
-               this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ja_JP", "素材製作台");\r
                this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");\r
                this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");\r
+               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");\r
+               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");\r
+               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");\r
+               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");\r
+               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ChemicalCraftingTable");\r
+               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ja_JP", "素材製作台");\r
 \r
                // Itemの名前を設定します\r
                this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);\r
@@ -272,10 +273,10 @@ public class ChemiCraft {
 \r
                // TileEntityを追加します\r
                GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");\r
+               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");\r
                GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");\r
                GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");\r
                GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");\r
-               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");\r
 \r
                // GUIを追加します\r
                NetworkRegistry.instance().registerGuiHandler(instance, proxy);\r
@@ -284,6 +285,14 @@ public class ChemiCraft {
                proxy.registerRenderInformation();\r
 \r
                //化学作業台類のレシピを追加します\r
+               GameRegistry.addRecipe(new ItemStack(this.blockElectrolysisTable),\r
+                               new Object[]{\r
+                       "XYX", "ZAZ", "ZZZ",\r
+                       Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
+                       Character.valueOf('Y'), new ItemStack(Block.workbench),\r
+                       Character.valueOf('Z'), new ItemStack(Block.stone),\r
+                       Character.valueOf('A'), new ItemStack(Block.tnt),\r
+               });\r
                GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),\r
                                new Object[]{\r
                        "XYX", "ZAZ", "ZZZ",\r
@@ -321,7 +330,7 @@ public class ChemiCraft {
                api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");\r
                api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
                api.addLangCompound("ja_JP", "Water", "水");\r
-
+\r
 \r
                //化合物のHandlerを設定します\r
                api.settingCompoundHandler("Water", new CompoundWater());\r
@@ -330,30 +339,23 @@ public class ChemiCraft {
                api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));\r
 \r
                //手榴弾の追加\r
-               api.addMaterialRecipe(new ItemStack[] {\r
-                               null,\r
-                               new ItemStack(Block.stone),\r
-                               null,\r
-                               new ItemStack(Block.stone),\r
-                               new ItemStack(Item.gunpowder),\r
-                               new ItemStack(Block.stone),\r
-                               null,\r
-                               new ItemStack(Block.stone),\r
-                               null\r
-               },\r
-               new ItemStack(this.itemAtomGrenade, 16, 0),\r
-               new NBTRecipeGrenade()\r
+               api.addMaterialRecipe(\r
+                               new ItemStack[]{\r
+                                               null,\r
+                                               new ItemStack(Block.stone),\r
+                                               null,\r
+                                               new ItemStack(Block.stone),\r
+                                               new ItemStack(Item.gunpowder),\r
+                                               new ItemStack(Block.stone),\r
+                                               null,\r
+                                               new ItemStack(Block.stone),\r
+                                               null\r
+                               },\r
+                               new ItemStack(this.itemAtomGrenade, 16, 0),\r
+                               new NBTRecipeGrenade()\r
                                );\r
-\r
-               api.addDecompositionRecipe(new ItemStack(Item.potion, 1, 0),\r
-                               new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},\r
-                               new int[] {2, 1});\r
-\r
-               api.addDecompositionRecipe(new ItemStack(this.itemCompounds, 1, api.getCompound("Water")),\r
-                               new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},\r
-                               new int[] {2, 1});\r
-\r
-               api.addDecompositionFuel(new ItemStack(Item.coal), 2000*8);\r
+               //Tickingの追加\r
+               this.proxy.registerTickHandler();\r
        }\r
 \r
        private void apiProcessing(final FMLPostInitializationEvent event) {\r
@@ -365,10 +367,6 @@ public class ChemiCraft {
        }\r
 \r
        private void debug(final FMLPostInitializationEvent event) {\r
-               //DebugTickingの追加\r
-               this.proxy.registerTickHandler();\r
-               api.addCompound("Debug");\r
-               this.api.settingCompoundHandler("Debug", new CompoundDebug());\r
        }\r
 \r
 }\r
index a538fed..b7b64e6 100644 (file)
@@ -61,6 +61,18 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 分解台の素材のリスト
+        */
+       private ArrayList<ItemStack> decompositionMaterial = new ArrayList<ItemStack>();
+
+
+       /**
+        * 分解台の結果のリスト
+        */
+       private ArrayList<ItemStack[]> decompositionResults = new ArrayList<ItemStack[]>();
+
+
+       /**
         * 化合台の原子の種類のリスト
         */
        private ArrayList<String[]> chemicalCombinationAtoms = new ArrayList<String[]>();
@@ -139,6 +151,22 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 分解レシピを追加します。resultの要素数は0<= n <= 16にしてください。
+        * @param material 素材
+        * @param result 結果
+        */
+       public void addDecompositionRecipe(ItemStack material, ItemStack[] result){
+               if(result.length <= 16){
+                       decompositionMaterial.add(material);
+                       decompositionResults.add(result);
+               }else{
+                       System.err.println("ChemiCraft内でエラー:addDecompositionRecipeの引数resultの要素数が16を超えています。" + "Material:" + material + "  Result:" + result);
+               }
+       }
+
+
+
+       /**
         * 化合レシピを追加します。materialの要素数は0<= n <= 16にしてください。
         * @param material 素材
         * @param result 結果
@@ -154,14 +182,14 @@ public class ChemiCraftAPI {
        public void addDecompositionRecipe(ItemStack material, int[] results, int[] stacks) {
                ItemStack[] itemstacks = new ItemStack[results.length];
                for (int i = 0; i < itemstacks.length; i++) {
-                       itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,stacks[i], results[i]);
+                       itemstacks[i] = new ItemStack(ChemiCraft.instance.atomsID,stacks[i], results[i]);
                }
                TileEntityPyrolysisTable.addRecipe(material, itemstacks);
        }
 
 
 
-       public void addDecompositionFuel(ItemStack itemstack, int burnTime) {
+       public void addDecompositionRecipe(ItemStack itemstack, int burnTime) {
                TileEntityPyrolysisTable.addFuel(itemstack, burnTime);
        }
 
@@ -214,6 +242,18 @@ public class ChemiCraftAPI {
 
 
 
+       public ArrayList<ItemStack> getDecompositionMaterial(){
+               return decompositionMaterial;
+       }
+
+
+
+       public ArrayList<ItemStack[]> getDecompositionResult(){
+               return decompositionResults;
+       }
+
+
+
        public ArrayList<String[]> getChemicalCombinationAtoms(){
                return chemicalCombinationAtoms;
        }
index 3f8340a..2389d16 100644 (file)
@@ -25,7 +25,7 @@ public class BlockChemicalCombinationTable extends BlockContainer {
 
        @Override
        public String getTextureFile() {
-               return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
@@ -52,7 +52,7 @@ public class BlockChemicalCombinationTable extends BlockContainer {
                if(par1 == 0){
                        return 17;
                }else if(par1 == 1){
-                       return 1;
+                       return this.blockIndexInTexture;
                }else{
                        return 16;
                }
index 0ba75da..c12bbd3 100644 (file)
@@ -26,7 +26,7 @@ public class BlockChemicalCraftingTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
@@ -37,7 +37,7 @@ public class BlockChemicalCraftingTable extends BlockContainer {
                if(par1 == 0){
                        return 17;
                }else if(par1 == 1){
-                       return 3;
+                       return this.blockIndexInTexture;
                }else{
                        return 16;
                }
index 11e8e65..11a3211 100644 (file)
@@ -6,25 +6,51 @@ import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
 import chemicraft.ChemiCraft;
+import chemicraft.debug.DebugTick;
 import chemicraft.tileentity.TileEntityElectrolysisTable;
 
 public class BlockElectrolysisTable extends BlockContainer
 {
 
-       public BlockElectrolysisTable(int par1, int par2, Material par3Material) {
+       public BlockElectrolysisTable(int par1, int par2, Material par3Material)
+       {
                super(par1, par2, par3Material);
                this.setCreativeTab(ChemiCraft.creativeTab);
        }
 
        @Override
-       public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
+       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.instance.guiElectrolysisTableID, par1World, par2, par3, par4);
                return true;
        }
 
        @Override
-       public String getTextureFile(){
-               return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
+       public String getTextureFile()
+       {
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
+       }
+
+       @Override
+       public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
+       {
+               TileEntity tileentity = par1World.getBlockTileEntity(par2, par3, par4);
+               if (tileentity != null) {
+                       DebugTick.removeDebugData("ElectrolysisTable" + "(x:" + tileentity.xCoord + " y:" + tileentity.yCoord + " z:" + tileentity.zCoord + ")");
+               }
+               super.breakBlock(par1World, par2, par3, par4, par5, par6);
+       }
+
+       @Override
+       public int getBlockTextureFromSide(int par1)
+       {
+               if (par1 == 0) {
+                       return 17;
+               } else if (par1 == 1) {
+                       return this.blockIndexInTexture;
+               } else {
+                       return 16;
+               }
        }
 
        @Override
index d24cc1a..61937dd 100644 (file)
@@ -26,7 +26,7 @@ public class BlockPyrolysisTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
@@ -51,7 +51,7 @@ public class BlockPyrolysisTable extends BlockContainer {
                if(par1 == 0){
                        return 17;
                }else if(par1 == 1){
-                       return 0;
+                       return this.blockIndexInTexture;
                }else{
                        return 16;
                }
index 668dfd0..8c57b22 100644 (file)
@@ -25,7 +25,7 @@ public class BlockToolAndWeaponCraftingTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
@@ -36,7 +36,7 @@ public class BlockToolAndWeaponCraftingTable extends BlockContainer {
                if(par1 == 0){
                        return 17;
                }else if(par1 == 1){
-                       return 2;
+                       return this.blockIndexInTexture;
                }else{
                        return 16;
                }
index 5ec9032..eff6f47 100644 (file)
@@ -28,14 +28,15 @@ public class ClientProxy extends CommonProxy {
 
        @Override
        public void registerRenderInformation() {
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEM_ATOMS_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEM_COMPOUNDS_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEM_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUI_CHEMICALCOMBINATION_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUI_PYROLYSIS_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUI_CHEMICALCRAFTING_TEXTURE);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUI_TOOLANDWEAPONCRAFTING_TEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMATOMSTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMCOMPOUNDSTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUIPYROLYSISTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUIELECTROLYSISTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUICHEMICALCOMBINATIONTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUICHEMICALCRAFTINGTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUITOOLANDWEAPONCRAFTINGTEXTURE);
                RenderingRegistry.registerEntityRenderingHandler(EntityAtomsGrenade.class, new RenderAtomsGrenade(0.5F));
        }
 
@@ -48,14 +49,14 @@ public class ClientProxy extends CommonProxy {
                TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
                if (tileEntity instanceof TileEntityPyrolysisTable) {
                        return new GuiPyrolysisTable(player, (TileEntityPyrolysisTable) tileEntity);
+               }else if(tileEntity instanceof TileEntityElectrolysisTable){
+                       return new GuiElectrolysisTable(player, (TileEntityElectrolysisTable) tileEntity);
                }else if(tileEntity instanceof TileEntityChemicalCombinationTable){
                        return new GuiChemicalCombinationTable(player, (TileEntityChemicalCombinationTable) tileEntity);
                }else if(tileEntity instanceof TileEntityToolAndWeaponCraftingTable){
                        return new GuiToolAndWeaponCraftingTable(player, (TileEntityToolAndWeaponCraftingTable) tileEntity);
                }else if(tileEntity instanceof TileEntityChemicalCraftingTable){
                        return new GuiChemicalCraftingTable(player, (TileEntityChemicalCraftingTable) tileEntity);
-               } else if (tileEntity instanceof TileEntityElectrolysisTable) {
-                       return new GuiElectrolysisTable(player, (TileEntityElectrolysisTable) tileEntity);
                }
                return null;
        }
diff --git a/common/chemicraft/compounds/CompoundDebug.java b/common/chemicraft/compounds/CompoundDebug.java
deleted file mode 100644 (file)
index 9e5bf24..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package chemicraft.compounds;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityLargeFireball;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import chemicraft.util.ICompoundHandler;
-
-public class CompoundDebug implements ICompoundHandler {
-
-       @Override
-       public ItemStack onItemRightClickHandler(ItemStack par1ItemStack,
-                       World par2World, EntityPlayer par3EntityPlayer) {
-               if (!par2World.isRemote) {
-                       double var1 = par3EntityPlayer.posX;
-                       double var2 = par3EntityPlayer.posY + 10;
-                       double var3 = par3EntityPlayer.posZ;
-                       double var4 = par3EntityPlayer.posX;
-                       double var5 = par3EntityPlayer.posY;
-                       double var6 = par3EntityPlayer.posZ;
-                       par2World.spawnEntityInWorld(new EntityLargeFireball(par2World, var1, var2, var3, var4, var5, var6));
-               }
-               return par1ItemStack;
-       }
-
-       @Override
-       public boolean onItemUseHandler(ItemStack par1ItemStack,
-                       EntityPlayer par2EntityPlayer, World par3World, int par4, int par5,
-                       int par6, int par7, float par8, float par9, float par10) {
-               return false;
-       }
-
-       @Override
-       public void onUpdateHandler(ItemStack par1ItemStack, World par2World,
-                       Entity par3Entity, int par4, boolean par5) {
-
-       }
-
-       @Override
-       public int getIconIndexHandler() {
-               return 0;
-       }
-
-}
index 26ebd93..2244348 100644 (file)
@@ -1,5 +1,6 @@
 package chemicraft.container;
 
+import net.minecraft.block.Block;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
diff --git a/common/chemicraft/container/ContainerElectrolysis.java b/common/chemicraft/container/ContainerElectrolysis.java
deleted file mode 100644 (file)
index d7f9615..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-package chemicraft.container;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.Slot;
-import net.minecraft.world.World;
-import chemicraft.ChemiCraft;
-import chemicraft.inventory.InventoryElectrolysisFuel;
-import chemicraft.inventory.InventoryElectrolysisMaterial;
-import chemicraft.inventory.InventoryElectrolysisResult;
-import chemicraft.slot.SlotElectrolysisMaterial;
-import chemicraft.slot.SlotElectrolysisResult;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
-
-public class ContainerElectrolysis extends Container
-{
-
-       private World worldObj;
-
-       private int posX;
-       private int posY;
-       private int posZ;
-
-       private TileEntityElectrolysisTable tileEntity;
-
-       private InventoryElectrolysisMaterial invm;
-       private InventoryElectrolysisResult invr;
-       private InventoryElectrolysisFuel invf;
-
-       public ContainerElectrolysis(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
-               super();
-               this.worldObj = par2.worldObj;
-               this.posX = par2.xCoord;
-               this.posY = par2.yCoord;
-               this.posZ = par2.zCoord;
-               this.invm = (InventoryElectrolysisMaterial) this.tileEntity.getInvMaterial();
-               this.invr = (InventoryElectrolysisResult) this.tileEntity.getInvResult();
-               this.invf = (InventoryElectrolysisFuel) this.tileEntity.getInvFuel();
-
-               this.addSlotToContainer(new SlotElectrolysisMaterial(invm, 0, 123, 34));
-               for (int i = 0; i < 16; i++) {
-                       this.addSlotToContainer(new SlotElectrolysisResult(invr, i, 123, 34));
-               }
-               this.addSlotToContainer(new SlotElectrolysisResult(invf, 0, 123, 34));
-
-               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));
-               }
-
-       }
-
-       @Override
-       public boolean canInteractWith(EntityPlayer par1EntityPlayer)
-       {
-               return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.electrolysisTableID ? false : par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
-       }
-
-}
index c6e5d50..3041cff 100644 (file)
@@ -5,9 +5,6 @@ import net.minecraft.inventory.Container;
 import net.minecraft.inventory.Slot;
 import net.minecraft.world.World;
 import chemicraft.ChemiCraft;
-import chemicraft.inventory.InventoryElectrolysisFuel;
-import chemicraft.inventory.InventoryElectrolysisMaterial;
-import chemicraft.inventory.InventoryElectrolysisResult;
 import chemicraft.slot.SlotElectrolysisMaterial;
 import chemicraft.slot.SlotElectrolysisResult;
 import chemicraft.tileentity.TileEntityElectrolysisTable;
@@ -21,11 +18,7 @@ public class ContainerElectrolysisTable extends Container
        private int posY;
        private int posZ;
 
-       private TileEntityElectrolysisTable tileEntity;
-
-       private InventoryElectrolysisMaterial invm;
-       private InventoryElectrolysisResult invr;
-       private InventoryElectrolysisFuel invf;
+       private TileEntityElectrolysisTable tileentity;
 
        public ContainerElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
                super();
@@ -33,15 +26,12 @@ public class ContainerElectrolysisTable extends Container
                this.posX = par2.xCoord;
                this.posY = par2.yCoord;
                this.posZ = par2.zCoord;
-               this.invm = (InventoryElectrolysisMaterial) this.tileEntity.getInvMaterial();
-               this.invr = (InventoryElectrolysisResult) this.tileEntity.getInvResult();
-               this.invf = (InventoryElectrolysisFuel) this.tileEntity.getInvFuel();
 
-               this.addSlotToContainer(new SlotElectrolysisMaterial(invm, 0, 123, 34));
+               this.addSlotToContainer(new SlotElectrolysisMaterial(this.tileentity.getInvMaterial(), 0, 123, 34));
                for (int i = 0; i < 16; i++) {
-                       this.addSlotToContainer(new SlotElectrolysisResult(invr, i, 123, 34));
+                       this.addSlotToContainer(new SlotElectrolysisResult(this.tileentity.getInvResult(), i, 123, 34));
                }
-               this.addSlotToContainer(new SlotElectrolysisResult(invf, 0, 123, 34));
+               this.addSlotToContainer(new SlotElectrolysisResult(this.tileentity.getInvFuel(), 0, 123, 34));
 
                int var3;
                for (var3 = 0; var3 < 3; ++var3)
@@ -62,8 +52,7 @@ public class ContainerElectrolysisTable extends Container
        @Override
        public boolean canInteractWith(EntityPlayer par1EntityPlayer)
        {
-               return true;
-               //return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.electrolysisTableID ? false : par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
+               return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.electrolysisTableID ? false : par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
        }
 
 }
index b6b7c2c..acadb79 100644 (file)
@@ -2,56 +2,17 @@ package chemicraft.container;
 
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
-import net.minecraft.inventory.Slot;
-import net.minecraft.world.World;
-import chemicraft.slot.SlotToolAndWeaponCraftingTableResult;
 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 
 public class ContainerToolAndWeaponCraftingTable extends Container {
 
-       private World worldobj;
-
-       private int posX;
-       private int posY;
-       private int posZ;
-
-       private TileEntityToolAndWeaponCraftingTable tileentity;
-
        public ContainerToolAndWeaponCraftingTable(EntityPlayer par1EntityPlayer, TileEntityToolAndWeaponCraftingTable par2){
                super();
-               this.tileentity = par2;
-               this.worldobj = this.tileentity.worldObj;
-               this.posX = this.tileentity.xCoord;
-               this.posY = this.tileentity.yCoord;
-               this.posZ = this.tileentity.zCoord;
-
-               for (int i = 0; i < 3; i++) {
-                       for (int j = 0; j < 3; j++) {
-                               this.addSlotToContainer(new Slot(this.tileentity.invm, i * 3 + i, 30 + i * 18, 17 + j * 18));
-                       }
-               }
-
-               this.addSlotToContainer(new SlotToolAndWeaponCraftingTableResult(this.tileentity.invr, 0, 125, 36));
-
-               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));
-               }
-
        }
 
        @Override
        public boolean canInteractWith(EntityPlayer var1) {
-               return true;
+               return false;
        }
 
 }
index 1e1edde..e168e75 100644 (file)
@@ -1,9 +1,11 @@
 package chemicraft.debug;
 
+import java.awt.BasicStroke;
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
+import java.awt.RenderingHints;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Iterator;
index 3e14652..9fdab59 100644 (file)
@@ -33,7 +33,7 @@ public class GuiChemicalCombinationTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUI_CHEMICALCOMBINATION_TEXTURE));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUICHEMICALCOMBINATIONTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index ea115d2..9164481 100644 (file)
@@ -19,7 +19,7 @@ public class GuiChemicalCraftingTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3){
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUI_CHEMICALCRAFTING_TEXTURE));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUICHEMICALCRAFTINGTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index 5fe55f8..5362a37 100644 (file)
@@ -9,15 +9,19 @@ import chemicraft.tileentity.TileEntityElectrolysisTable;
 public class GuiElectrolysisTable extends GuiContainer
 {
 
-       public GuiElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
+       private TileEntityElectrolysisTable tileentity;
+
+       public GuiElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2)
+       {
                super(new ContainerElectrolysisTable(par1EntityPlayer, par2));
+               this.tileentity = par2;
                this.ySize = 204;
        }
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
        {
-               //this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiElectrolysisTableTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUIELECTROLYSISTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index 59b7008..0c7686d 100644 (file)
@@ -18,7 +18,7 @@ public class GuiPyrolysisTable extends GuiContainer{
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUI_PYROLYSIS_TEXTURE));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUIPYROLYSISTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index d26ce31..7440007 100644 (file)
@@ -14,7 +14,7 @@ public class GuiToolAndWeaponCraftingTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUI_TOOLANDWEAPONCRAFTING_TEXTURE));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUITOOLANDWEAPONCRAFTINGTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
@@ -5,7 +5,7 @@ import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
 import net.minecraft.item.ItemStack;
 
-public class InventoryElectrolysisFuel implements IInventory
+public class InventoryElectrolysisTableFuel implements IInventory
 {
 
        private ItemStack[] inventory = new ItemStack[1];
@@ -5,7 +5,7 @@ import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
 import net.minecraft.item.ItemStack;
 
-public class InventoryElectrolysisMaterial implements IInventory
+public class InventoryElectrolysisTableMaterial implements IInventory
 {
 
        private ItemStack[] inventory = new ItemStack[1];
@@ -5,7 +5,7 @@ import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
 import net.minecraft.item.ItemStack;
 
-public class InventoryElectrolysisResult implements IInventory
+public class InventoryElectrolysisTableResult implements IInventory
 {
 
        private ItemStack[] inventory = new ItemStack[16];
index fab443c..ada8aa4 100644 (file)
@@ -109,4 +109,5 @@ public class InventoryPyrolysisTableMaterial implements IInventory {
        @Override
        public void closeChest() {
        }
+
 }
index ea14e17..f8ca9fd 100644 (file)
@@ -94,7 +94,6 @@ public class InventoryPyrolysisTableResult implements IInventory {
 
        @Override
        public void onInventoryChanged() {
-               if(this.eventHandler != null) this.eventHandler.onCraftMatrixChanged(this);
        }
 
        @Override
@@ -109,4 +108,5 @@ public class InventoryPyrolysisTableResult implements IInventory {
        @Override
        public void closeChest() {
        }
+
 }
index ad1b147..3ec489c 100644 (file)
@@ -43,7 +43,7 @@ public class ItemAtoms extends Item {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.ITEM_ATOMS_TEXTURE;
+               return ChemiCraft.instance.ITEMATOMSTEXTURE;
        }
 
 
index 17d6514..8628675 100644 (file)
@@ -79,7 +79,7 @@ public class ItemCompounds extends Item {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.ITEM_COMPOUNDS_TEXTURE;
+               return ChemiCraft.instance.ITEMCOMPOUNDSTEXTURE;
        }
 
 
index fd8cca2..2547632 100644 (file)
@@ -56,7 +56,6 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer
                // デバッグ用
                if (par2World.isRemote) {
                        par3EntityPlayer.addChatMessage("result1=" + result1 + " result2=" + result2 + " result3=" + result3);
-                       par3EntityPlayer.addChatMessage("このメッセージは開発版のみの表示ですが、もし製品版で表示されていた場合はご連絡ください。");
                }
 
                return par1ItemStack;
@@ -81,7 +80,7 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer
                if (uniqueBlock instanceof BlockFire){
                        par1ItemStack.damageItem(1, par2EntityPlayer);
 
-                       int result1 = MathHelperPlus.probability(90, 10);
+                       int result1 = MathHelperPlus.probability(99, 1);
 
                        if (result1 == 0) {
                                this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par2EntityPlayer);
index dd402de..d8b549d 100644 (file)
@@ -30,7 +30,7 @@ public class RenderAtomsGrenade extends Render {
                float var10 = this.field_77002_a;
                GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
                byte var11 = 1;
-               this.loadTexture(ChemiCraft.instance.ITEM_TEXTURE);
+               this.loadTexture(ChemiCraft.instance.ITEMTEXTURE);
                Tessellator var12 = Tessellator.instance;
                float var13 = (float)(var11 % 16 * 16 + 0) / 256.0F;
                float var14 = (float)(var11 % 16 * 16 + 16) / 256.0F;
index fb83ba6..0d9ae9a 100644 (file)
@@ -5,8 +5,8 @@ import net.minecraft.inventory.Slot;
 
 public class SlotPyrolysisTableMaterial extends Slot {
 
-       public SlotPyrolysisTableMaterial(IInventory par1IInventory, int par2, int par3, int par4) {
-               super(par1IInventory, par2, par3, par4);
+       public SlotPyrolysisTableMaterial(IInventory par1iInventory, int par2, int par3, int par4) {
+               super(par1iInventory, par2, par3, par4);
        }
 
 }
index 41d25e0..29412ea 100644 (file)
@@ -6,12 +6,12 @@ import net.minecraft.item.ItemStack;
 
 public class SlotPyrolysisTableResult extends Slot {
 
-       public SlotPyrolysisTableResult(IInventory par1IInventory, int par2, int par3, int par4) {
-               super(par1IInventory, par2, par3, par4);
+       public SlotPyrolysisTableResult(IInventory par1iInventory, int par2,    int par3, int par4) {
+               super(par1iInventory, par2, par3, par4);
        }
 
-       public boolean isItemValid(ItemStack par1ItemStack)
-       {
+       @Override
+       public boolean isItemValid(ItemStack par1ItemStack){
                return false;
        }
 
index 7edcb3a..58f4c0a 100644 (file)
@@ -5,13 +5,11 @@ import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
 import chemicraft.container.ContainerChemicalCombinationTable;
 import chemicraft.container.ContainerChemicalCraftingTable;
-import chemicraft.container.ContainerElectrolysisTable;
 import chemicraft.container.ContainerPyrolysisTable;
 import chemicraft.container.ContainerToolAndWeaponCraftingTable;
 import chemicraft.debug.DebugTick;
 import chemicraft.tileentity.TileEntityChemicalCombinationTable;
 import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
 import chemicraft.tileentity.TileEntityPyrolysisTable;
 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 import cpw.mods.fml.common.network.IGuiHandler;
@@ -34,16 +32,14 @@ public class CommonProxy implements IGuiHandler {
                        return null;
 
                TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
-               if(tileEntity instanceof TileEntityChemicalCombinationTable){
+               if (tileEntity instanceof TileEntityPyrolysisTable) {
+                       return new ContainerPyrolysisTable(player, (TileEntityPyrolysisTable) tileEntity);
+               }else if(tileEntity instanceof TileEntityChemicalCombinationTable){
                        return new ContainerChemicalCombinationTable(player, (TileEntityChemicalCombinationTable) tileEntity);
                }else if(tileEntity instanceof TileEntityToolAndWeaponCraftingTable){
                        return new ContainerToolAndWeaponCraftingTable(player, (TileEntityToolAndWeaponCraftingTable) tileEntity);
                }else if(tileEntity instanceof TileEntityChemicalCraftingTable){
                        return new ContainerChemicalCraftingTable(player, (TileEntityChemicalCraftingTable) tileEntity);
-               }else if(tileEntity instanceof TileEntityElectrolysisTable){
-                       return new ContainerElectrolysisTable(player, (TileEntityElectrolysisTable)tileEntity);
-               } else if(tileEntity instanceof TileEntityPyrolysisTable) {
-                       return new ContainerPyrolysisTable(player, (TileEntityPyrolysisTable)tileEntity);
                }
                return null;
        }
index 59945b4..b7c7b1a 100644 (file)
@@ -13,7 +13,6 @@ import net.minecraft.world.World;
 import chemicraft.ChemiCraft;
 import chemicraft.tileentity.TileEntityChemicalCombinationTable;
 import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
 import chemicraft.tileentity.TileEntityPyrolysisTable;
 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 
@@ -101,37 +100,6 @@ public class PacketHandler implements IPacketHandler {
                return packet;
        }
 
-       public static Packet getPacket(TileEntityElectrolysisTable tileEntity) {
-               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
-               DataOutputStream var2 = new DataOutputStream(var1);
-
-               // Blockのx, y, z座標
-               int x, y, z;
-
-               // x, y, z座標を代入
-               x = tileEntity.xCoord;
-               y = tileEntity.yCoord;
-               z = tileEntity.zCoord;
-
-               try {
-                       // 座標書き込み
-                       var2.writeInt(x);
-                       var2.writeInt(y);
-                       var2.writeInt(z);
-                       tileEntity.writePacket(var2);
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-
-               // パケットの作成
-               Packet250CustomPayload packet = new Packet250CustomPayload();
-               packet.channel = "chemicraft";
-               packet.data = var1.toByteArray();
-               packet.length = var1.size();
-               packet.isChunkDataPacket = true;
-               return packet;
-       }
-
        public static Packet getPacket(TileEntityChemicalCombinationTable tileEntity) {
                ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
                DataOutputStream var2 = new DataOutputStream(var1);
index 726b1ae..c580061 100644 (file)
@@ -1,23 +1,21 @@
 package chemicraft.tileentity;
 
-import java.io.DataOutputStream;
-
 import net.minecraft.nbt.NBTTagCompound;
 import net.minecraft.network.packet.Packet;
 import net.minecraft.tileentity.TileEntity;
-import chemicraft.inventory.InventoryElectrolysisFuel;
-import chemicraft.inventory.InventoryElectrolysisMaterial;
-import chemicraft.inventory.InventoryElectrolysisResult;
+import chemicraft.inventory.InventoryElectrolysisTableFuel;
+import chemicraft.inventory.InventoryElectrolysisTableMaterial;
+import chemicraft.inventory.InventoryElectrolysisTableResult;
 
 public class TileEntityElectrolysisTable extends TileEntity
 {
 
-       private InventoryElectrolysisMaterial invm = new InventoryElectrolysisMaterial();
-       private InventoryElectrolysisResult invr = new InventoryElectrolysisResult();
-       private InventoryElectrolysisFuel invf = new InventoryElectrolysisFuel();
+       private InventoryElectrolysisTableMaterial invm = new InventoryElectrolysisTableMaterial();
+       private InventoryElectrolysisTableResult invr = new InventoryElectrolysisTableResult();
+       private InventoryElectrolysisTableFuel invf = new InventoryElectrolysisTableFuel();
 
        public TileEntityElectrolysisTable() {
-
+               
        }
 
        @Override
@@ -35,29 +33,25 @@ public class TileEntityElectrolysisTable extends TileEntity
        @Override
        public void updateEntity()
        {
-
+               
        }
 
        @Override
        public Packet getDescriptionPacket()
        {
-               return this.getDescriptionPacket();
+               return super.getDescriptionPacket();
        }
 
-       public InventoryElectrolysisMaterial getInvMaterial(){
+       public InventoryElectrolysisTableMaterial getInvMaterial(){
                return this.invm;
        }
 
-       public InventoryElectrolysisResult getInvResult(){
+       public InventoryElectrolysisTableResult getInvResult(){
                return this.invr;
        }
 
-       public InventoryElectrolysisFuel getInvFuel(){
+       public InventoryElectrolysisTableFuel getInvFuel(){
                return this.invf;
        }
 
-       public void writePacket(DataOutputStream var2) {
-
-       }
-
 }
index 9a451cb..40fd89e 100644 (file)
@@ -11,6 +11,8 @@ import net.minecraft.nbt.NBTTagCompound;
 import net.minecraft.nbt.NBTTagList;
 import net.minecraft.network.packet.Packet;
 import net.minecraft.tileentity.TileEntity;
+import chemicraft.debug.DebugData;
+import chemicraft.debug.DebugTick;
 import chemicraft.inventory.InventoryPyrolysisTableFuel;
 import chemicraft.inventory.InventoryPyrolysisTableMaterial;
 import chemicraft.inventory.InventoryPyrolysisTableResult;
@@ -18,6 +20,10 @@ import chemicraft.system.PacketHandler;
 
 import com.google.common.io.ByteArrayDataInput;
 
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
 public class TileEntityPyrolysisTable extends TileEntity {
 
        private InventoryPyrolysisTableMaterial invm = new InventoryPyrolysisTableMaterial();
@@ -87,7 +93,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                } else if (this.worldObj.isThundering() && var1) {
                                        this.heat += 0.25F;
                                } else {
-                                       this.heat += 0.5F;
+                                       this.heat += 3F;
                                }
                        } else {
                                this.heat = 1700;
@@ -121,7 +127,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                                //var2 = true;
                                                if (itemstackMaterial.itemID == materialItem.itemID && itemstackMaterial.getItemDamage() == materialItem.getItemDamage()) {
                                                        this.inItem(itemstackMaterial);
-                                                       if (materialItem.stackSize > 1) {
+                                                       if (materialItem.stackSize >= 1) {
                                                                this.invm.setInventorySlotContents(0, new ItemStack(materialItem.itemID, --materialItem.stackSize, materialItem.getItemDamage()));
                                                        } else {
                                                                this.invm.setInventorySlotContents(0, null);
@@ -153,7 +159,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                                                        if (fuelItem != null) {
                                                                                if (itemstackFuel.itemID == fuelItem.itemID && itemstackFuel.getItemDamage() == fuelItem.getItemDamage()) {
                                                                                        this.fuelRestTime = fuelList.get(itemstackFuel);
-                                                                                       if (fuelItem.stackSize > 1) {
+                                                                                       if (fuelItem.stackSize >= 1) {
                                                                                                this.invf.setInventorySlotContents(0, new ItemStack(fuelItem.itemID, --fuelItem.stackSize, fuelItem.getItemDamage()));
                                                                                                break;
                                                                                        } else {
@@ -417,8 +423,8 @@ public class TileEntityPyrolysisTable extends TileEntity {
        public boolean isInItemCheck(ItemStack key) {
                ItemStack[] results = recipeList.get(key).clone();
                ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
-               for (int j = 0; j < this.invr.getSizeInventory(); j++) {
-                       containerResults[j] = this.invr.getStackInSlot(j);
+               for (int i = 0; i < this.invr.getSizeInventory(); i++) {
+                       containerResults[i] = this.invr.getStackInSlot(i);
                }
 
                for (int i = 0; i < results.length; i++) {
@@ -427,7 +433,6 @@ public class TileEntityPyrolysisTable extends TileEntity {
                        int var5 = results[i].stackSize;
                        for (int j = 0; j < containerResults.length; j++) {
                                if (containerResults[j] == null) {
-                                       containerResults[j] = results[i];
                                        results[i] = null;
                                        break;
                                } else {
@@ -437,7 +442,6 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                        int var7 = containerResults[j].getMaxStackSize();
                                        if (var1 == var2 && var3 == var4) {
                                                if (var5 + var6 <= var7) {
-                                                       containerResults[j] = results[i];
                                                        results[i] = null;
                                                        break;
                                                } else {
@@ -457,12 +461,12 @@ public class TileEntityPyrolysisTable extends TileEntity {
 
        public void inItem(ItemStack key) {
                ItemStack[] results = recipeList.get(key);
+               ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
+               for (int i = 0; i < this.invr.getSizeInventory(); i++) {
+                       containerResults[i] = this.invr.getStackInSlot(i);
+               }
 
                for (int i = 0; i < results.length; i++) {
-                       ItemStack[] containerResults = new ItemStack[this.invr.getSizeInventory()];
-                       for (int j = 0; j < this.invr.getSizeInventory(); j++) {
-                               containerResults[j] = this.invr.getStackInSlot(j);
-                       }
                        int var1 = results[i].itemID;
                        int var3 = results[i].getItemDamage();
                        int var5 = results[i].stackSize;
@@ -477,6 +481,11 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                        int var7 = containerResults[j].getMaxStackSize();
                                        if (var1 == var2 && var3 == var4) {
                                                if (var5 + var6 <= var7) {
+                                                       System.out.println(var5);
+                                                       System.out.println(var6);
+                                                       System.out.println(var5 + var6);
+                                                       System.out.println(i);
+                                                       System.out.println(j);
                                                        this.invr.setInventorySlotContents(j, new ItemStack(results[i].itemID, var5 + var6, results[i].getItemDamage()));
                                                        break;
                                                } else {
index 32d3adc..44bc07e 100644 (file)
@@ -3,16 +3,11 @@ package chemicraft.tileentity;
 import java.io.DataOutputStream;
 
 import net.minecraft.tileentity.TileEntity;
-import chemicraft.inventory.InventoryToolAndWeaponCraftingTableMaterial;
-import chemicraft.inventory.InventoryToolAndWeaponCraftingTableResult;
 
 import com.google.common.io.ByteArrayDataInput;
 
 public class TileEntityToolAndWeaponCraftingTable extends TileEntity {
 
-       public InventoryToolAndWeaponCraftingTableMaterial invm = new InventoryToolAndWeaponCraftingTableMaterial();
-       public InventoryToolAndWeaponCraftingTableResult invr = new InventoryToolAndWeaponCraftingTableResult();
-
        public void readPacket(ByteArrayDataInput data) {
                try {
                } catch (Exception e) {
index 2f093aa..1a09c7a 100644 (file)
Binary files a/resources/chemicraft/blocks/cctable.png and b/resources/chemicraft/blocks/cctable.png differ