OSDN Git Service

いろいろ修正
authormozipi <mozipi@users.sourceforge.jp>
Mon, 11 Feb 2013 03:03:53 +0000 (12:03 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Mon, 11 Feb 2013 03:03:53 +0000 (12:03 +0900)
14 files changed:
common/pcc/chemicraft/ChemiCraft.java
common/pcc/chemicraft/ChemiCraftAPI.java
common/pcc/chemicraft/block/BlockElectrolysisTable.java
common/pcc/chemicraft/container/ContainerChemicalCombinationTable.java
common/pcc/chemicraft/container/ContainerElectrolysisTable.java
common/pcc/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
common/pcc/chemicraft/gui/GuiElectrolysisTable.java
common/pcc/chemicraft/item/ItemCompounds.java
common/pcc/chemicraft/system/CommonProxy.java
common/pcc/chemicraft/system/PacketHandler.java
common/pcc/chemicraft/tileentity/TileEntityChemicalCombinationTable.java
common/pcc/chemicraft/tileentity/TileEntityElectrolysisTable.java
common/pcc/chemicraft/tileentity/TileEntityPyrolysisTable.java
common/pcc/chemicraft/tileentity/TileEntityToolAndWeaponCraftingTable.java

index 5e6d87f..be18e76 100644 (file)
@@ -1,4 +1,3 @@
-<<<<<<< HEAD:common/pcc/chemicraft/ChemiCraft.java
 package pcc.chemicraft;
 
 import net.minecraft.block.Block;
@@ -42,7 +41,6 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
 import cpw.mods.fml.common.network.NetworkMod;
 import cpw.mods.fml.common.network.NetworkRegistry;
 import cpw.mods.fml.common.registry.GameRegistry;
-
 /**
  * ChemiCraft本体
  * @author P.C.C.
@@ -79,7 +77,7 @@ public class ChemiCraft {
        /**
         * ChemiCraftのProxy.
         */
-       @SidedProxy(clientSide = "chemicraft.client.ClientProxy", serverSide = "chemicraft.system.CommonProxy")
+       @SidedProxy(clientSide = "pcc.chemicraft.client.ClientProxy", serverSide = "pcc.chemicraft.system.CommonProxy")
        public static CommonProxy proxy;
 
        /**
@@ -99,28 +97,28 @@ public class ChemiCraft {
         * BlockID.
         */
        public int pyrolysisTableID;
+       public int electrolysisTableID;
        public int chemicalConbinationTableID;
        public int toolAndWeaponCraftingTableID;
        public int chemicalCraftingTableID;
-       public int electrolysisTableID;
 
        /**
         * GUIID.
         */
        public int guiPyrolysisTableID;
+       public int guiElectrolysisTableID;
        public int guiChemicalCombinationTableID;
        public int guiToolAndWeaponCraftingTableID;
        public int guiChemicalCraftingTableID;
-       public int guiElectrolysisTableID;
 
        /**
         * Block型変数.
         */
        public Block blockPyrolysisTable;
+       public Block blockElectrolysisTable;
        public Block blockChemicalCombinationTable;
        public Block blockToolAndWeaponCraftingTable;
        public Block blockChemicalCraftingTable;
-       public Block blockElectrolysisTable;
 
        /**
         * Item型変数.
@@ -133,15 +131,15 @@ public class ChemiCraft {
        /**
         * このmodで使用するTextureのパス.
         */
-       public final String ITEM_ATOMS_TEXTURE = "/chemicraft/items/Atoms.png";
-       public final String ITEM_COMPOUNDS_TEXTURE = "/chemicraft/items/Compounds.png";
-       public final String ITEM_TEXTURE = "/chemicraft/items/items.png";
-       public final String BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE = "/chemicraft/blocks/cctable.png";
-       public final String GUI_PYROLYSIS_TEXTURE = "/chemicraft/guis/Pyrolysis.png";
-       public final String GUI_ELECTROLYSIS_TEXTURE = "/chemicraft/guis/Electrolysis.png";
-       public final String GUI_CHEMICALCOMBINATION_TEXTURE = "/chemicraft/guis/ChemicalCombination.png";
-       public final String GUI_TOOLANDWEAPONCRAFTING_TEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";
-       public final String GUI_CHEMICALCRAFTING_TEXTURE = "/chemicraft/guis/MaterialCrafting.png";
+       public final String ITEMATOMSTEXTURE = "/pcc/chemicraft/items/Atoms.png";
+       public final String ITEMCOMPOUNDSTEXTURE = "/pcc/chemicraft/items/Compounds.png";
+       public final String ITEMTEXTURE = "/pcc/chemicraft/items/items.png";
+       public final String BLOCKCHEMICALCRAFTINGTABLETEXTURE = "/pcc/chemicraft/blocks/cctable.png";
+       public final String GUIPYROLYSISTEXTURE = "/pcc/chemicraft/guis/Pyrolysis.png";
+       public final String GUIELECTROLYSISTEXTURE = "/pcc/chemicraft/guis/Electrolysis.png";
+       public final String GUICHEMICALCOMBINATIONTEXTURE = "/pcc/chemicraft/guis/ChemicalCombination.png";
+       public final String GUITOOLANDWEAPONCRAFTINGTEXTURE = "/pcc/chemicraft/guis/ToolAndWeaponCrafting.png";
+       public final String GUICHEMICALCRAFTINGTEXTURE = "/pcc/chemicraft/guis/MaterialCrafting.png";
 
        /**
         * このmodに必要な補助クラスのインスタンス.
@@ -159,10 +157,10 @@ public class ChemiCraft {
                cfg.load();
 
                Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
-               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2401);
-               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2402);
-               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2403);
-               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTableID", 2404);
+               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
+               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
+               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);
+               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);
 
                Property atomsIDProp = cfg.getItem("AtomsID", 25000);
                Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);
@@ -170,26 +168,26 @@ public class ChemiCraft {
                Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);
 
                Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
-               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);
-               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1002);
-               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1003);
-               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableID", 1004);
+               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
+               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
+               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
+               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
 
 
                this.pyrolysisTableID = pyrolysisTableIDProp.getInt();
+               this.electrolysisTableID = electrolysisTableIDProp.getInt();
                this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();
                this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();
                this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();
-               this.electrolysisTableID = electrolysisTableIDProp.getInt();
                this.atomsID = atomsIDProp.getInt();
                this.compoundsID = compoundsIDProp.getInt();
                this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();
                this.atomGrenadeID = atomGrenadeIDProp.getInt();
                this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
+               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
                this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
                this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
                this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
-               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
 
                cfg.save();
        }
@@ -367,7 +365,7 @@ public class ChemiCraft {
        private void debug(final FMLPostInitializationEvent event) {
                //DebugTickingの追加
                this.proxy.registerTickHandler();
-               api.addCompound("Debug");
+               this.api.addCompound("Debug");
                this.api.settingCompoundHandler("Debug", new CompoundDebug());
 
                /*
@@ -380,377 +378,3 @@ public class ChemiCraft {
        }
 
 }
-=======
-package chemicraft;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.BiomeManager;
-import net.minecraftforge.common.Configuration;
-import net.minecraftforge.common.DimensionManager;
-import net.minecraftforge.common.Property;
-import chemicraft.block.BlockChemicalCombinationTable;
-import chemicraft.block.BlockChemicalCraftingTable;
-import chemicraft.block.BlockElectrolysisTable;
-import chemicraft.block.BlockPyrolysisTable;
-import chemicraft.block.BlockToolAndWeaponCraftingTable;
-import chemicraft.compounds.CompoundWater;
-import chemicraft.debug.CommandDeleteItem;
-import chemicraft.debug.CommandGenDebugRoom;
-import chemicraft.debug.CommandSetTile;
-import chemicraft.item.ItemAtoms;
-import chemicraft.item.ItemAtomsGrenade;
-import chemicraft.item.ItemCompounds;
-import chemicraft.item.ItemGasCollectingBottle;
-import chemicraft.system.CommonProxy;
-import chemicraft.system.PacketHandler;
-import chemicraft.tileentity.TileEntityChemicalCombinationTable;
-import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
-import chemicraft.tileentity.TileEntityPyrolysisTable;
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
-import chemicraft.util.Auxiliary;
-import chemicraft.util.Auxiliary.ArrayAuxiliary;
-import chemicraft.util.Auxiliary.NameAuxiliary;
-import chemicraft.util.CreativeTabAtoms;
-import chemicraft.util.NBTRecipeGrenade;
-import chemicraft.util.WorldProviderChemical;
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.SidedProxy;
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
-import cpw.mods.fml.common.network.NetworkMod;
-import cpw.mods.fml.common.network.NetworkRegistry;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-/**
- * ChemiCraft本体
- * @author P.C.C.
- *
- */
-@Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")
-@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)
-public class ChemiCraft {
-
-       public static final String[] ATOMSNAME = {
-               "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",
-               "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",
-               "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",
-               "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",
-               "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",
-               "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",
-               "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",
-               "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };
-
-       public static final String[] ATOMSNAMEJP = {
-               "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",
-               "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",
-               "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",
-               "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",
-               "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",
-               "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };
-
-       /**
-        * このmodのインスタンス
-        */
-       @Mod.Instance("chemiCraft")
-       public static ChemiCraft instance;
-
-       /**
-        * ChemiCraftのProxy.
-        */
-       @SidedProxy(clientSide = "chemicraft.client.ClientProxy", serverSide = "chemicraft.system.CommonProxy")
-       public static CommonProxy proxy;
-
-       /**
-        * ChemiCraftのCreativeTab.
-        */
-       public static final CreativeTabs creativeTab = new CreativeTabAtoms("ChemiCraft");
-
-       /**
-        * ItemID.
-        */
-       public int atomsID;
-       public int compoundsID;
-       public int gasCollectingBottleID;
-       public int atomGrenadeID;
-
-       /**
-        * BlockID.
-        */
-       public int pyrolysisTableID;
-       public int electrolysisTableID;
-       public int chemicalConbinationTableID;
-       public int toolAndWeaponCraftingTableID;
-       public int chemicalCraftingTableID;
-
-       /**
-        * GUIID.
-        */
-       public int guiPyrolysisTableID;
-       public int guiElectrolysisTableID;
-       public int guiChemicalCombinationTableID;
-       public int guiToolAndWeaponCraftingTableID;
-       public int guiChemicalCraftingTableID;
-
-       /**
-        * Block型変数.
-        */
-       public Block blockPyrolysisTable;
-       public Block blockElectrolysisTable;
-       public Block blockChemicalCombinationTable;
-       public Block blockToolAndWeaponCraftingTable;
-       public Block blockChemicalCraftingTable;
-
-       /**
-        * Item型変数.
-        */
-       public Item itemAtoms;
-       public Item itemCompounds;
-       public Item itemGasCollectingBottle;
-       public Item itemAtomGrenade;
-
-       /**
-        * このmodで使用するTextureのパス.
-        */
-       public final String ITEMATOMSTEXTURE = "/chemicraft/items/Atoms.png";
-       public final String ITEMCOMPOUNDSTEXTURE = "/chemicraft/items/Compounds.png";
-       public final String ITEMTEXTURE = "/chemicraft/items/items.png";
-       public final String BLOCKCHEMICALCRAFTINGTABLETEXTURE = "/chemicraft/blocks/cctable.png";
-       public final String GUIPYROLYSISTEXTURE = "/chemicraft/guis/Pyrolysis.png";
-       public final String GUIELECTROLYSISTEXTURE = "/chemicraft/guis/Electrolysis.png";
-       public final String GUICHEMICALCOMBINATIONTEXTURE = "/chemicraft/guis/ChemicalCombination.png";
-       public final String GUITOOLANDWEAPONCRAFTINGTEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";
-       public final String GUICHEMICALCRAFTINGTEXTURE = "/chemicraft/guis/MaterialCrafting.png";
-
-       /**
-        * このmodに必要な補助クラスのインスタンス.
-        */
-       public Auxiliary auxiliary = new Auxiliary();
-       public NameAuxiliary nameAuxiliary = new NameAuxiliary();
-       public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();
-
-       private ChemiCraftAPI api = ChemiCraftAPI.getInstance();
-       private ChemiCraftData chemicalData = new ChemiCraftData();
-
-       @Mod.PreInit
-       public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {
-               Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
-               cfg.load();
-
-               Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
-               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
-               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
-               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);
-               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);
-
-               Property atomsIDProp = cfg.getItem("AtomsID", 25000);
-               Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);
-               Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);
-               Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);
-
-               Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
-               Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
-               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
-               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
-               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
-
-
-               this.pyrolysisTableID = pyrolysisTableIDProp.getInt();
-               this.electrolysisTableID = electrolysisTableIDProp.getInt();
-               this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();
-               this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();
-               this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();
-               this.atomsID = atomsIDProp.getInt();
-               this.compoundsID = compoundsIDProp.getInt();
-               this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();
-               this.atomGrenadeID = atomGrenadeIDProp.getInt();
-               this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
-               this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
-               this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
-               this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
-               this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
-
-               cfg.save();
-       }
-
-       @Mod.ServerStarting
-       public void serverStarting(final FMLServerStartingEvent event) {
-               event.registerServerCommand(new CommandSetTile());
-               event.registerServerCommand(new CommandDeleteItem());
-               event.registerServerCommand(new CommandGenDebugRoom());
-       }
-
-       @Mod.PostInit
-       public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {
-               this.settingProcessing(event);
-               this.apiProcessing(event);
-               this.debug(event);
-       }
-
-       private void settingProcessing(final FMLPostInitializationEvent event) {
-
-               // Blockを追加します
-               this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("PyrolysisTable");
-               this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 1, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ElectrolysisTable");
-               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 2, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ChemicalCombinationTable");
-               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 3, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ToolAndWeaponCraftingTable");
-               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(chemicalCraftingTableID, 4, Material.ground).
-                               setHardness(2.0F).
-                               setResistance(0.0F).
-                               setStepSound(Block.soundStoneFootstep).
-                               setBlockName("ChemicalCraftingTable");
-
-               // Itemを追加します
-               this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");
-               this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");
-               this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
-               this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);
-
-               // BlockをMinecraftに登録します
-               GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");
-               GameRegistry.registerBlock(this.blockElectrolysisTable, "ElectrolysisTable");
-               GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
-               GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
-               GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
-
-               // Blockの名前を設定します
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");
-               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");
-               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");
-               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
-               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
-               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ChemicalCraftingTable");
-               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ja_JP", "素材製作台");
-
-               // Itemの名前を設定します
-               this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);
-               this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "元素手榴弾");
-
-               // TileEntityを追加します
-               GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");
-               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");
-               GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");
-               GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");
-               GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");
-
-               // GUIを追加します
-               NetworkRegistry.instance().registerGuiHandler(instance, proxy);
-
-               // 描画関係の読み込み
-               proxy.registerRenderInformation();
-
-               //化学作業台類のレシピを追加します
-               GameRegistry.addRecipe(new ItemStack(this.blockElectrolysisTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Block.tnt),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Item.bucketLava),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCombinationTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Block.obsidian),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
-               });
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),
-                               new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),
-               });
-
-               // 化合物を追加します
-               api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
-               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
-               api.addLangCompound("ja_JP", "Water", "水");
-
-
-               //化合物のHandlerを設定します
-               api.settingCompoundHandler("Water", new CompoundWater());
-
-               //化合物のレシピを追加します
-               api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));
-
-               //手榴弾の追加
-               api.addMaterialRecipe(
-                               new ItemStack[]{
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               new ItemStack(Item.gunpowder),
-                                               new ItemStack(Block.stone),
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               null
-                               },
-                               new ItemStack(this.itemAtomGrenade, 16, 0),
-                               new NBTRecipeGrenade()
-                               );
-               //Tickingの追加
-               this.proxy.registerTickHandler();
-       }
-
-       private void apiProcessing(final FMLPostInitializationEvent event) {
-               // API用の処理
-               this.nameAuxiliary.addName(itemCompounds, api.getInstance().getCompoundsName().toArray());
-               for (int i = 0; i < api.getCompoundsLang().size(); i++) {
-                       this.nameAuxiliary.addName(itemCompounds, api.getCompoundsLang().get(i), api.getInstance().getCompoundsLangName().toArray());
-               }
-       }
-
-       private void debug(final FMLPostInitializationEvent event) {
-       }
-
-}
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/ChemiCraft.java
index d11984f..2110f73 100644 (file)
@@ -61,18 +61,6 @@ public class ChemiCraftAPI {
 
 
        /**
-        * 分解台の素材のリスト
-        */
-       private ArrayList<ItemStack> decompositionMaterial = new ArrayList<ItemStack>();
-
-
-       /**
-        * 分解台の結果のリスト
-        */
-       private ArrayList<ItemStack[]> decompositionResults = new ArrayList<ItemStack[]>();
-
-
-       /**
         * 化合台の原子の種類のリスト
         */
        private ArrayList<String[]> chemicalCombinationAtoms = new ArrayList<String[]>();
@@ -169,22 +157,6 @@ 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 結果
@@ -206,23 +178,19 @@ 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.atomsID,stacks[i], results[i]);
+                       itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,stacks[i], results[i]);
                }
                TileEntityPyrolysisTable.addRecipe(material, itemstacks);
        }
 
 
 
-<<<<<<< HEAD:common/pcc/chemicraft/ChemiCraftAPI.java
        /**
         * 分解台の燃料を追加します
         * @param itemstack 燃料のItemStack
         * @param burnTime 燃焼時間(tick * rate)
         */
        public void addDecompositionFuel(ItemStack itemstack, int burnTime) {
-=======
-       public void addDecompositionRecipe(ItemStack itemstack, int burnTime) {
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/ChemiCraftAPI.java
                TileEntityPyrolysisTable.addFuel(itemstack, burnTime);
        }
 
@@ -312,18 +280,6 @@ public class ChemiCraftAPI {
 
 
 
-       public ArrayList<ItemStack> getDecompositionMaterial(){
-               return decompositionMaterial;
-       }
-
-
-
-       public ArrayList<ItemStack[]> getDecompositionResult(){
-               return decompositionResults;
-       }
-
-
-
        public ArrayList<String[]> getChemicalCombinationAtoms(){
                return chemicalCombinationAtoms;
        }
index c2100bc..f0b41f4 100644 (file)
@@ -5,14 +5,9 @@ import net.minecraft.block.material.Material;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
-<<<<<<< HEAD:common/pcc/chemicraft/block/BlockElectrolysisTable.java
 import pcc.chemicraft.ChemiCraft;
+import pcc.chemicraft.debug.DebugTick;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
-=======
-import chemicraft.ChemiCraft;
-import chemicraft.debug.DebugTick;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/block/BlockElectrolysisTable.java
 
 public class BlockElectrolysisTable extends BlockContainer
 {
index 54f1860..4e1a37b 100644 (file)
@@ -1,6 +1,5 @@
 package pcc.chemicraft.container;
 
-import net.minecraft.block.Block;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
index c9d9905..799c51d 100644 (file)
@@ -4,19 +4,12 @@ import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
 import net.minecraft.inventory.Slot;
 import net.minecraft.world.World;
-<<<<<<< HEAD:common/pcc/chemicraft/container/ContainerElectrolysisTable.java
 import pcc.chemicraft.inventory.InventoryElectrolysisFuel;
 import pcc.chemicraft.inventory.InventoryElectrolysisMaterial;
 import pcc.chemicraft.inventory.InventoryElectrolysisResult;
 import pcc.chemicraft.slot.SlotElectrolysisMaterial;
 import pcc.chemicraft.slot.SlotElectrolysisResult;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
-=======
-import chemicraft.ChemiCraft;
-import chemicraft.slot.SlotElectrolysisMaterial;
-import chemicraft.slot.SlotElectrolysisResult;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/container/ContainerElectrolysisTable.java
 
 public class ContainerElectrolysisTable extends Container
 {
@@ -27,7 +20,11 @@ public class ContainerElectrolysisTable extends Container
        private int posY;
        private int posZ;
 
-       private TileEntityElectrolysisTable tileentity;
+       private TileEntityElectrolysisTable tileEntity;
+
+       private InventoryElectrolysisMaterial invm;
+       private InventoryElectrolysisResult invr;
+       private InventoryElectrolysisFuel invf;
 
        public ContainerElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
                super();
@@ -35,12 +32,15 @@ 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(this.tileentity.getInvMaterial(), 0, 123, 34));
+               this.addSlotToContainer(new SlotElectrolysisMaterial(invm, 0, 123, 34));
                for (int i = 0; i < 16; i++) {
-                       this.addSlotToContainer(new SlotElectrolysisResult(this.tileentity.getInvResult(), i, 123, 34));
+                       this.addSlotToContainer(new SlotElectrolysisResult(invr, i, 123, 34));
                }
-               this.addSlotToContainer(new SlotElectrolysisResult(this.tileentity.getInvFuel(), 0, 123, 34));
+               this.addSlotToContainer(new SlotElectrolysisResult(invf, 0, 123, 34));
 
                int var3;
                for (var3 = 0; var3 < 3; ++var3)
@@ -61,7 +61,8 @@ public class ContainerElectrolysisTable extends Container
        @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;
+               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;
        }
 
 }
index 9e5ccca..d609775 100644 (file)
@@ -2,7 +2,6 @@ package pcc.chemicraft.container;
 
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
-<<<<<<< HEAD:common/pcc/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
 import net.minecraft.inventory.IInventory;
 import net.minecraft.inventory.Slot;
 import net.minecraft.world.World;
@@ -10,15 +9,19 @@ import pcc.chemicraft.ChemiCraftAPI;
 import pcc.chemicraft.inventory.InventoryToolAndWeaponCraftingTableMaterial;
 import pcc.chemicraft.slot.SlotToolAndWeaponCraftingTableResult;
 import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
-=======
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
 
 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();
-<<<<<<< HEAD:common/pcc/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
                this.tileentity = par2;
                this.worldobj = this.tileentity.worldObj;
                this.posX = this.tileentity.xCoord;
@@ -49,8 +52,6 @@ public class ContainerToolAndWeaponCraftingTable extends Container {
                        this.addSlotToContainer(new Slot(par1EntityPlayer.inventory, var3, 8 + var3 * 18, 143));
                }
 
-=======
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/container/ContainerToolAndWeaponCraftingTable.java
        }
 
        @Override
@@ -62,7 +63,7 @@ public class ContainerToolAndWeaponCraftingTable extends Container {
 
        @Override
        public boolean canInteractWith(EntityPlayer var1) {
-               return false;
+               return true;
        }
 
 }
index fcce31b..a8062c8 100644 (file)
@@ -2,6 +2,7 @@ package pcc.chemicraft.gui;
 
 import net.minecraft.client.gui.inventory.GuiContainer;
 import net.minecraft.entity.player.EntityPlayer;
+import pcc.chemicraft.ChemiCraft;
 import pcc.chemicraft.container.ContainerElectrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 
index 19f152c..0d773b2 100644 (file)
@@ -24,10 +24,14 @@ public class ItemCompounds extends Item {
 
        @Override
        public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
-               for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
-                       if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
-                               return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
+               try {
+                       for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
+                               if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
+                                       return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
+                               }
                        }
+               } catch (IndexOutOfBoundsException e) {
+                       par1ItemStack.stackSize = 0;
                }
                return false;
        }
@@ -36,10 +40,14 @@ public class ItemCompounds extends Item {
        @Override
        public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
        {
-               for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
-                       if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
-                               ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
+               try {
+                       for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
+                               if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
+                                       ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
+                               }
                        }
+               } catch (IndexOutOfBoundsException e) {
+                       par1ItemStack.stackSize = 0;
                }
                return par1ItemStack;
        }
@@ -48,10 +56,15 @@ public class ItemCompounds extends Item {
 
        @Override
        public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5){
-               for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
-                       if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
-                               ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
+               try {
+                       for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
+                               if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
+                                       ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
+                               }
                        }
+               } catch (IndexOutOfBoundsException e) {
+                       par1ItemStack.stackSize = 0;
+                       par1ItemStack = null;
                }
        }
 
@@ -72,7 +85,12 @@ public class ItemCompounds extends Item {
 
        @Override
        public String getItemNameIS(ItemStack par1ItemStack){
-               return super.getItemName() + "." + ChemiCraftAPI.getInstance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
+               try {
+                       return super.getItemName() + "." + ChemiCraftAPI.getInstance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
+               } catch (ArrayIndexOutOfBoundsException e) {
+                       par1ItemStack.stackSize = 0;
+               }
+               return null;
        }
 
 
@@ -87,10 +105,14 @@ public class ItemCompounds extends Item {
        @SideOnly(Side.CLIENT)
        @Override
        public int getIconFromDamage(int par1){
-               for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
-                       if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
-                               return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).getIconIndexHandler();
+               try {
+                       for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
+                               if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
+                                       return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).getIconIndexHandler();
+                               }
                        }
+               } catch (IndexOutOfBoundsException e) {
+                       return 0;
                }
                return 0;
        }
index 72a8de0..00e2277 100644 (file)
@@ -3,29 +3,15 @@ package pcc.chemicraft.system;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
-<<<<<<< HEAD:common/pcc/chemicraft/system/CommonProxy.java
 import pcc.chemicraft.container.ContainerChemicalCombinationTable;
 import pcc.chemicraft.container.ContainerChemicalCraftingTable;
-import pcc.chemicraft.container.ContainerElectrolysisTable;
 import pcc.chemicraft.container.ContainerPyrolysisTable;
 import pcc.chemicraft.container.ContainerToolAndWeaponCraftingTable;
 import pcc.chemicraft.debug.DebugTick;
 import pcc.chemicraft.tileentity.TileEntityChemicalCombinationTable;
 import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
-=======
-import chemicraft.container.ContainerChemicalCombinationTable;
-import chemicraft.container.ContainerChemicalCraftingTable;
-import chemicraft.container.ContainerPyrolysisTable;
-import chemicraft.container.ContainerToolAndWeaponCraftingTable;
-import chemicraft.debug.DebugTick;
-import chemicraft.tileentity.TileEntityChemicalCombinationTable;
-import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityPyrolysisTable;
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/system/CommonProxy.java
 import cpw.mods.fml.common.network.IGuiHandler;
 import cpw.mods.fml.common.registry.TickRegistry;
 import cpw.mods.fml.relauncher.Side;
index 2fe37fb..b6e4f98 100644 (file)
@@ -10,20 +10,11 @@ import net.minecraft.network.packet.Packet;
 import net.minecraft.network.packet.Packet250CustomPayload;
 import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
-<<<<<<< HEAD:common/pcc/chemicraft/system/PacketHandler.java
 import pcc.chemicraft.ChemiCraft;
 import pcc.chemicraft.tileentity.TileEntityChemicalCombinationTable;
 import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
-=======
-import chemicraft.ChemiCraft;
-import chemicraft.tileentity.TileEntityChemicalCombinationTable;
-import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityPyrolysisTable;
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/system/PacketHandler.java
 
 import com.google.common.io.ByteArrayDataInput;
 import com.google.common.io.ByteStreams;
index b845956..9ad1f58 100644 (file)
@@ -1,27 +1,23 @@
 package pcc.chemicraft.tileentity;
 
+import java.io.DataOutputStream;
+
 import net.minecraft.nbt.NBTTagCompound;
 import net.minecraft.network.packet.Packet;
 import net.minecraft.tileentity.TileEntity;
-<<<<<<< HEAD:common/pcc/chemicraft/tileentity/TileEntityElectrolysisTable.java
 import pcc.chemicraft.inventory.InventoryElectrolysisFuel;
 import pcc.chemicraft.inventory.InventoryElectrolysisMaterial;
 import pcc.chemicraft.inventory.InventoryElectrolysisResult;
-=======
-import chemicraft.inventory.InventoryElectrolysisTableFuel;
-import chemicraft.inventory.InventoryElectrolysisTableMaterial;
-import chemicraft.inventory.InventoryElectrolysisTableResult;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/tileentity/TileEntityElectrolysisTable.java
 
 public class TileEntityElectrolysisTable extends TileEntity
 {
 
-       private InventoryElectrolysisTableMaterial invm = new InventoryElectrolysisTableMaterial();
-       private InventoryElectrolysisTableResult invr = new InventoryElectrolysisTableResult();
-       private InventoryElectrolysisTableFuel invf = new InventoryElectrolysisTableFuel();
+       private InventoryElectrolysisMaterial invm = new InventoryElectrolysisMaterial();
+       private InventoryElectrolysisResult invr = new InventoryElectrolysisResult();
+       private InventoryElectrolysisFuel invf = new InventoryElectrolysisFuel();
 
        public TileEntityElectrolysisTable() {
-               
+
        }
 
        @Override
@@ -39,25 +35,29 @@ public class TileEntityElectrolysisTable extends TileEntity
        @Override
        public void updateEntity()
        {
-               
+
        }
 
        @Override
        public Packet getDescriptionPacket()
        {
-               return super.getDescriptionPacket();
+               return this.getDescriptionPacket();
        }
 
-       public InventoryElectrolysisTableMaterial getInvMaterial(){
+       public InventoryElectrolysisMaterial getInvMaterial(){
                return this.invm;
        }
 
-       public InventoryElectrolysisTableResult getInvResult(){
+       public InventoryElectrolysisResult getInvResult(){
                return this.invr;
        }
 
-       public InventoryElectrolysisTableFuel getInvFuel(){
+       public InventoryElectrolysisFuel getInvFuel(){
                return this.invf;
        }
 
+       public void writePacket(DataOutputStream var2) {
+
+       }
+
 }
index dcde36e..315aa53 100644 (file)
@@ -11,26 +11,13 @@ import net.minecraft.nbt.NBTTagCompound;
 import net.minecraft.nbt.NBTTagList;
 import net.minecraft.network.packet.Packet;
 import net.minecraft.tileentity.TileEntity;
-<<<<<<< HEAD:common/pcc/chemicraft/tileentity/TileEntityPyrolysisTable.java
 import pcc.chemicraft.inventory.InventoryPyrolysisTableFuel;
 import pcc.chemicraft.inventory.InventoryPyrolysisTableMaterial;
 import pcc.chemicraft.inventory.InventoryPyrolysisTableResult;
 import pcc.chemicraft.system.PacketHandler;
-=======
-import chemicraft.debug.DebugData;
-import chemicraft.debug.DebugTick;
-import chemicraft.inventory.InventoryPyrolysisTableFuel;
-import chemicraft.inventory.InventoryPyrolysisTableMaterial;
-import chemicraft.inventory.InventoryPyrolysisTableResult;
-import chemicraft.system.PacketHandler;
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/tileentity/TileEntityPyrolysisTable.java
 
 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();
@@ -100,7 +87,7 @@ public class TileEntityPyrolysisTable extends TileEntity {
                                } else if (this.worldObj.isThundering() && var1) {
                                        this.heat += 0.25F;
                                } else {
-                                       this.heat += 3F;
+                                       this.heat += 0.5F;
                                }
                        } else {
                                this.heat = 1700;
@@ -134,7 +121,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);
@@ -166,7 +153,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 {
@@ -430,8 +417,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 i = 0; i < this.invr.getSizeInventory(); i++) {
-                       containerResults[i] = this.invr.getStackInSlot(i);
+               for (int j = 0; j < this.invr.getSizeInventory(); j++) {
+                       containerResults[j] = this.invr.getStackInSlot(j);
                }
 
                for (int i = 0; i < results.length; i++) {
@@ -440,6 +427,7 @@ 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 {
@@ -449,6 +437,7 @@ 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 {
@@ -468,12 +457,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;
@@ -488,11 +477,6 @@ 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 615b731..c6e0fa1 100644 (file)
@@ -3,16 +3,16 @@ package pcc.chemicraft.tileentity;
 import java.io.DataOutputStream;
 
 import net.minecraft.tileentity.TileEntity;
-<<<<<<< HEAD:common/pcc/chemicraft/tileentity/TileEntityToolAndWeaponCraftingTable.java
 import pcc.chemicraft.inventory.InventoryToolAndWeaponCraftingTableMaterial;
 import pcc.chemicraft.inventory.InventoryToolAndWeaponCraftingTableResult;
-=======
->>>>>>> b8902d318f2a200d5d5a82e98d5377bd89c056a8:common/chemicraft/tileentity/TileEntityToolAndWeaponCraftingTable.java
 
 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) {