OSDN Git Service

7f8829aa76ba9fe8a0edeab8cd40faa75836c368
[chemicraft/chemicraft.git] / common / chemicraft / ChemiCraft.java
1 package chemicraft;\r
2 \r
3 import net.minecraft.block.Block;\r
4 import net.minecraft.block.material.Material;\r
5 import net.minecraft.client.audio.SoundManager;\r
6 import net.minecraft.creativetab.CreativeTabs;\r
7 import net.minecraft.item.Item;\r
8 import net.minecraft.item.ItemStack;\r
9 import net.minecraftforge.common.Configuration;\r
10 import net.minecraftforge.common.Property;\r
11 import chemicraft.block.BlockChemicalCombinationTable;\r
12 import chemicraft.block.BlockChemicalCraftingTable;\r
13 import chemicraft.block.BlockElectrolysisTable;\r
14 import chemicraft.block.BlockPyrolysisTable;\r
15 import chemicraft.block.BlockToolAndWeaponCraftingTable;\r
16 import chemicraft.compounds.CompoundDebug;\r
17 import chemicraft.compounds.CompoundWater;\r
18 import chemicraft.debug.CommandDeleteItem;\r
19 import chemicraft.debug.CommandGenDebugRoom;\r
20 import chemicraft.debug.CommandSetTile;\r
21 import chemicraft.item.ItemAtoms;\r
22 import chemicraft.item.ItemAtomsGrenade;\r
23 import chemicraft.item.ItemCompounds;\r
24 import chemicraft.item.ItemGasCollectingBottle;\r
25 import chemicraft.system.CommonProxy;\r
26 import chemicraft.system.PacketHandler;\r
27 import chemicraft.tileentity.TileEntityChemicalCombinationTable;\r
28 import chemicraft.tileentity.TileEntityChemicalCraftingTable;\r
29 import chemicraft.tileentity.TileEntityElectrolysisTable;\r
30 import chemicraft.tileentity.TileEntityPyrolysisTable;\r
31 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;\r
32 import chemicraft.util.Auxiliary;\r
33 import chemicraft.util.Auxiliary.ArrayAuxiliary;\r
34 import chemicraft.util.Auxiliary.NameAuxiliary;\r
35 import chemicraft.util.CreativeTabAtoms;\r
36 import chemicraft.util.NBTRecipeGrenade;\r
37 import cpw.mods.fml.common.Mod;\r
38 import cpw.mods.fml.common.SidedProxy;\r
39 import cpw.mods.fml.common.event.FMLPostInitializationEvent;\r
40 import cpw.mods.fml.common.event.FMLPreInitializationEvent;\r
41 import cpw.mods.fml.common.event.FMLServerStartingEvent;\r
42 import cpw.mods.fml.common.network.NetworkMod;\r
43 import cpw.mods.fml.common.network.NetworkRegistry;\r
44 import cpw.mods.fml.common.registry.GameRegistry;\r
45 \r
46 /**\r
47  * ChemiCraft本体\r
48  * @author P.C.C.\r
49  *\r
50  */\r
51 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")\r
52 @NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)\r
53 public class ChemiCraft {\r
54 \r
55         public static final String[] ATOMSNAME = {\r
56                 "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",\r
57                 "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",\r
58                 "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",\r
59                 "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",\r
60                 "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",\r
61                 "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",\r
62                 "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",\r
63                 "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };\r
64 \r
65         public static final String[] ATOMSNAMEJP = {\r
66                 "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",\r
67                 "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",\r
68                 "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",\r
69                 "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",\r
70                 "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",\r
71                 "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };\r
72 \r
73         /**\r
74          * このmodのインスタンス\r
75          */\r
76         @Mod.Instance("chemiCraft")\r
77         public static ChemiCraft instance;\r
78 \r
79         /**\r
80          * ChemiCraftのProxy.\r
81          */\r
82         @SidedProxy(clientSide = "chemicraft.client.ClientProxy", serverSide = "chemicraft.system.CommonProxy")\r
83         public static CommonProxy proxy;\r
84 \r
85         /**\r
86          * ChemiCraftのCreativeTab.\r
87          */\r
88         public static final CreativeTabs creativeTab = new CreativeTabAtoms("ChemiCraft");\r
89 \r
90         /**\r
91          * ItemID.\r
92          */\r
93         public int atomsID;\r
94         public int compoundsID;\r
95         public int gasCollectingBottleID;\r
96         public int atomGrenadeID;\r
97 \r
98         /**\r
99          * BlockID.\r
100          */\r
101         public int pyrolysisTableID;\r
102         public int chemicalConbinationTableID;\r
103         public int toolAndWeaponCraftingTableID;\r
104         public int chemicalCraftingTableID;\r
105         public int electrolysisTableID;\r
106 \r
107         /**\r
108          * GUIID.\r
109          */\r
110         public int guiPyrolysisTableID;\r
111         public int guiChemicalCombinationTableID;\r
112         public int guiToolAndWeaponCraftingTableID;\r
113         public int guiChemicalCraftingTableID;\r
114         public int guiElectrolysisTableID;\r
115 \r
116         /**\r
117          * Block型変数.\r
118          */\r
119         public Block blockPyrolysisTable;\r
120         public Block blockChemicalCombinationTable;\r
121         public Block blockToolAndWeaponCraftingTable;\r
122         public Block blockChemicalCraftingTable;\r
123         public Block blockElectrolysisTable;\r
124 \r
125         /**\r
126          * Item型変数.\r
127          */\r
128         public Item itemAtoms;\r
129         public Item itemCompounds;\r
130         public Item itemGasCollectingBottle;\r
131         public Item itemAtomGrenade;\r
132 \r
133         /**\r
134          * このmodで使用するTextureのパス.\r
135          */\r
136         public final String ITEM_ATOMS_TEXTURE = "/chemicraft/items/Atoms.png";\r
137         public final String ITEM_COMPOUNDS_TEXTURE = "/chemicraft/items/Compounds.png";\r
138         public final String ITEM_TEXTURE = "/chemicraft/items/items.png";\r
139         public final String BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE = "/chemicraft/blocks/cctable.png";\r
140         public final String GUI_PYROLYSIS_TEXTURE = "/chemicraft/guis/Pyrolysis.png";\r
141         public final String GUI_ELECTROLYSIS_TEXTURE = "/chemicraft/guis/Electrolysis.png";\r
142         public final String GUI_CHEMICALCOMBINATION_TEXTURE = "/chemicraft/guis/ChemicalCombination.png";\r
143         public final String GUI_TOOLANDWEAPONCRAFTING_TEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";\r
144         public final String GUI_CHEMICALCRAFTING_TEXTURE = "/chemicraft/guis/MaterialCrafting.png";\r
145 \r
146         /**\r
147          * このmodに必要な補助クラスのインスタンス.\r
148          */\r
149         public Auxiliary auxiliary = new Auxiliary();\r
150         public NameAuxiliary nameAuxiliary = new NameAuxiliary();\r
151         public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();\r
152 \r
153         private ChemiCraftAPI api = ChemiCraftAPI.getInstance();\r
154         private ChemiCraftData chemicalData = new ChemiCraftData();\r
155 \r
156         @Mod.PreInit\r
157         public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {\r
158                 Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());\r
159                 cfg.load();\r
160 \r
161                 Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);\r
162                 Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2401);\r
163                 Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2402);\r
164                 Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2403);\r
165                 Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTableID", 2404);\r
166 \r
167                 Property atomsIDProp = cfg.getItem("AtomsID", 25000);\r
168                 Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);\r
169                 Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);\r
170                 Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);\r
171 \r
172                 Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);\r
173                 Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);\r
174                 Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1002);\r
175                 Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1003);\r
176                 Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableID", 1004);\r
177 \r
178 \r
179                 this.pyrolysisTableID = pyrolysisTableIDProp.getInt();\r
180                 this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();\r
181                 this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();\r
182                 this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();\r
183                 this.electrolysisTableID = electrolysisTableIDProp.getInt();\r
184                 this.atomsID = atomsIDProp.getInt();\r
185                 this.compoundsID = compoundsIDProp.getInt();\r
186                 this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
187                 this.atomGrenadeID = atomGrenadeIDProp.getInt();\r
188                 this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();\r
189                 this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();\r
190                 this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();\r
191                 this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();\r
192                 this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();\r
193 \r
194                 cfg.save();\r
195         }\r
196 \r
197         @Mod.ServerStarting\r
198         public void serverStarting(final FMLServerStartingEvent event) {\r
199                 event.registerServerCommand(new CommandSetTile());\r
200                 event.registerServerCommand(new CommandDeleteItem());\r
201                 event.registerServerCommand(new CommandGenDebugRoom());\r
202         }\r
203 \r
204         @Mod.PostInit\r
205         public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {\r
206                 this.settingProcessing(event);\r
207                 this.apiProcessing(event);\r
208                 this.debug(event);\r
209         }\r
210 \r
211         private void settingProcessing(final FMLPostInitializationEvent event) {\r
212 \r
213                 // Blockを追加します\r
214                 this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).\r
215                                 setHardness(2.0F).\r
216                                 setResistance(0.0F).\r
217                                 setStepSound(Block.soundStoneFootstep).\r
218                                 setBlockName("PyrolysisTable");\r
219                 this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 0, Material.ground).\r
220                                 setHardness(2.0F).\r
221                                 setResistance(0.0F).\r
222                                 setStepSound(Block.soundStoneFootstep).\r
223                                 setBlockName("ChemicalCombinationTable");\r
224                 this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 0, Material.ground).\r
225                                 setHardness(2.0F).\r
226                                 setResistance(0.0F).\r
227                                 setStepSound(Block.soundStoneFootstep).\r
228                                 setBlockName("ToolAndWeaponCraftingTable");\r
229                 this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.chemicalCraftingTableID, 0, Material.ground).\r
230                                 setHardness(2.0F).\r
231                                 setResistance(0.0F).\r
232                                 setStepSound(Block.soundStoneFootstep).\r
233                                 setBlockName("ChemicalCraftingTable");\r
234                 this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 0, Material.ground).\r
235                                 setHardness(2.0F).\r
236                                 setResistance(0.0F).\r
237                                 setStepSound(Block.soundStoneFootstep).\r
238                                 setBlockName("ElectrolysisTable");\r
239 \r
240                 // Itemを追加します\r
241                 this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");\r
242                 this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");\r
243                 this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);\r
244                 this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);\r
245 \r
246                 // BlockをMinecraftに登録します\r
247                 GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");\r
248                 GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");\r
249                 GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");\r
250                 GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");\r
251                 GameRegistry.registerBlock(this.blockElectrolysisTable, "BlockElectrolysisTable");\r
252 \r
253                 // Blockの名前を設定します\r
254                 this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");\r
255                 this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");\r
256                 this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");\r
257                 this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");\r
258                 this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");\r
259                 this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");\r
260                 this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ChemicalCraftingTable");\r
261                 this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ja_JP", "素材製作台");\r
262                 this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");\r
263                 this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");\r
264 \r
265                 // Itemの名前を設定します\r
266                 this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);\r
267                 this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);\r
268                 this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");\r
269                 this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");\r
270                 this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");\r
271                 this.nameAuxiliary.addName(this.itemAtomGrenade, "元素手榴弾");\r
272 \r
273                 // TileEntityを追加します\r
274                 GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");\r
275                 GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");\r
276                 GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");\r
277                 GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");\r
278                 GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");\r
279 \r
280                 // GUIを追加します\r
281                 NetworkRegistry.instance().registerGuiHandler(instance, proxy);\r
282 \r
283                 // 描画関係の読み込み\r
284                 proxy.registerRenderInformation();\r
285 \r
286                 //化学作業台類のレシピを追加します\r
287                 GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),\r
288                                 new Object[]{\r
289                         "XYX", "ZAZ", "ZZZ",\r
290                         Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
291                         Character.valueOf('Y'), new ItemStack(Block.workbench),\r
292                         Character.valueOf('Z'), new ItemStack(Block.stone),\r
293                         Character.valueOf('A'), new ItemStack(Item.bucketLava),\r
294                 });\r
295                 GameRegistry.addRecipe(new ItemStack(this.blockChemicalCombinationTable),\r
296                                 new Object[]{\r
297                         "XYX", "ZAZ", "ZZZ",\r
298                         Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
299                         Character.valueOf('Y'), new ItemStack(Block.workbench),\r
300                         Character.valueOf('Z'), new ItemStack(Block.stone),\r
301                         Character.valueOf('A'), new ItemStack(Block.obsidian),\r
302                 });\r
303                 GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),\r
304                                 new Object[]{\r
305                         "XYX", "ZAZ", "ZZZ",\r
306                         Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
307                         Character.valueOf('Y'), new ItemStack(Block.workbench),\r
308                         Character.valueOf('Z'), new ItemStack(Block.stone),\r
309                         Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),\r
310                 });\r
311                 GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),\r
312                                 new Object[]{\r
313                         "XYX", "ZAZ", "ZZZ",\r
314                         Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
315                         Character.valueOf('Y'), new ItemStack(Block.workbench),\r
316                         Character.valueOf('Z'), new ItemStack(Block.stone),\r
317                         Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),\r
318                 });\r
319 \r
320                 // 化合物を追加します\r
321                 api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");\r
322                 api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
323                 api.addLangCompound("ja_JP", "Water", "水");\r
324
325 \r
326                 //化合物のHandlerを設定します\r
327                 api.settingCompoundHandler("Water", new CompoundWater());\r
328 \r
329                 //化合物のレシピを追加します\r
330                 api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));\r
331 \r
332                 //手榴弾の追加\r
333                 api.addMaterialRecipe(new ItemStack[] {\r
334                                 null,\r
335                                 new ItemStack(Block.stone),\r
336                                 null,\r
337                                 new ItemStack(Block.stone),\r
338                                 new ItemStack(Item.gunpowder),\r
339                                 new ItemStack(Block.stone),\r
340                                 null,\r
341                                 new ItemStack(Block.stone),\r
342                                 null\r
343                 },\r
344                 new ItemStack(this.itemAtomGrenade, 16, 0),\r
345                 new NBTRecipeGrenade()\r
346                                 );\r
347 \r
348                 api.addDecompositionRecipe(new ItemStack(Item.potion, 1, 0),\r
349                                 new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},\r
350                                 new int[] {2, 1});\r
351 \r
352                 api.addDecompositionRecipe(new ItemStack(this.itemCompounds, 1, api.getCompound("Water")),\r
353                                 new int[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},\r
354                                 new int[] {2, 1});\r
355 \r
356                 api.addDecompositionFuel(new ItemStack(Item.coal), 2000*8);\r
357         }\r
358 \r
359         private void apiProcessing(final FMLPostInitializationEvent event) {\r
360                 // API用の処理\r
361                 this.nameAuxiliary.addName(itemCompounds, api.getInstance().getCompoundsName().toArray());\r
362                 for (int i = 0; i < api.getCompoundsLang().size(); i++) {\r
363                         this.nameAuxiliary.addName(itemCompounds, api.getCompoundsLang().get(i), api.getInstance().getCompoundsLangName().toArray());\r
364                 }\r
365         }\r
366 \r
367         private void debug(final FMLPostInitializationEvent event) {\r
368                 //DebugTickingの追加\r
369                 this.proxy.registerTickHandler();\r
370                 api.addCompound("Debug");\r
371                 this.api.settingCompoundHandler("Debug", new CompoundDebug());\r
372         }\r
373 \r
374 }\r