OSDN Git Service

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