OSDN Git Service

大規模なソース仕様変更
[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.minecraft.src.ModLoader;
9 import net.minecraftforge.common.Configuration;
10 import net.minecraftforge.common.MinecraftForge;
11 import net.minecraftforge.common.Property;
12 import net.minecraftforge.oredict.OreDictionary;
13 import pcc.chemicraft.block.BlockChemicalCombinationTable;
14 import pcc.chemicraft.block.BlockChemicalCraftingTable;
15 import pcc.chemicraft.block.BlockElectrolysisTable;
16 import pcc.chemicraft.block.BlockPyrolysisTable;
17 import pcc.chemicraft.block.BlockToolAndWeaponCraftingTable;
18 import pcc.chemicraft.compounds.CompoundDebug;
19 import pcc.chemicraft.compounds.CompoundWater;
20 import pcc.chemicraft.creativetab.CreativeTabAtomOres;
21 import pcc.chemicraft.creativetab.CreativeTabChemiCraft;
22 import pcc.chemicraft.debug.CommandDeleteItem;
23 import pcc.chemicraft.debug.CommandGenDebugRoom;
24 import pcc.chemicraft.debug.CommandSetTile;
25 import pcc.chemicraft.entity.EntityDust;
26 import pcc.chemicraft.gen.EnumOreSpawnFrequency;
27 import pcc.chemicraft.item.ItemAtoms;
28 import pcc.chemicraft.item.ItemAtomsGrenade;
29 import pcc.chemicraft.item.ItemChemiCell;
30 import pcc.chemicraft.item.ItemCompounds;
31 import pcc.chemicraft.item.ItemDust;
32 import pcc.chemicraft.item.ItemGasCollectingBottle;
33 import pcc.chemicraft.item.ItemRadiationBallet;
34 import pcc.chemicraft.item.ItemRadiationGun;
35 import pcc.chemicraft.ore.BlockAtomOres;
36 import pcc.chemicraft.ore.ItemAtomOres;
37 import pcc.chemicraft.system.CommonProxy;
38 import pcc.chemicraft.system.PacketHandler;
39 import pcc.chemicraft.tileentity.TileEntityChemicalCombinationTable;
40 import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
41 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
42 import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
43 import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
44 import pcc.chemicraft.util.Auxiliary;
45 import pcc.chemicraft.util.Auxiliary.ArrayAuxiliary;
46 import pcc.chemicraft.util.Auxiliary.NameAuxiliary;
47 import pcc.chemicraft.util.NBTRecipeGrenade;
48 import cpw.mods.fml.common.Mod;
49 import cpw.mods.fml.common.Mod.Instance;
50 import cpw.mods.fml.common.Mod.PostInit;
51 import cpw.mods.fml.common.Mod.PreInit;
52 import cpw.mods.fml.common.Mod.ServerStarting;
53 import cpw.mods.fml.common.SidedProxy;
54 import cpw.mods.fml.common.event.FMLPostInitializationEvent;
55 import cpw.mods.fml.common.event.FMLPreInitializationEvent;
56 import cpw.mods.fml.common.event.FMLServerStartingEvent;
57 import cpw.mods.fml.common.network.NetworkMod;
58 import cpw.mods.fml.common.network.NetworkRegistry;
59 import cpw.mods.fml.common.registry.EntityRegistry;
60 import cpw.mods.fml.common.registry.GameRegistry;
61 import cpw.mods.fml.common.registry.LanguageRegistry;
62
63 /**
64  * ChemiCraft本体
65  * @author P.C.C.
66  */
67 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")
68 @NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)
69 public class ChemiCraft implements Runnable {
70
71         /**
72          * 元素名配列
73          */
74         public static final String[] ATOMSNAME = {
75                 "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",
76                 "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",
77                 "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",
78                 "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",
79                 "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",
80                 "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",
81                 "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",
82                 "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };
83
84         /**
85          * 元素名日本語版配列
86          */
87         public static final String[] ATOMSNAMEJP = {
88                 "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",
89                 "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",
90                 "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",
91                 "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",
92                 "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",
93                 "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };
94
95         /**
96          * this is ChemiCraft instance.
97          */
98         @Instance("chemiCraft")
99         public static ChemiCraft instance;
100
101         /**
102          * proxy of ChemiCraft.
103          */
104         @SidedProxy(clientSide = "pcc.chemicraft.client.ClientProxy", serverSide = "pcc.chemicraft.system.CommonProxy")
105         public static CommonProxy proxy;
106
107         /**
108          * CreativeTab of ChemiCraft.
109          */
110         public static final CreativeTabs creativeTabChemiCraft = new CreativeTabChemiCraft("ChemiCraft");
111         public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomOres("AtomsOre");
112
113         /**
114          * the ItemID.
115          */
116         public int atomsID;
117         public int compoundsID;
118         public int gasCollectingBottleID;
119         public int atomGrenadeID;
120         public int chemicalCellsID;
121         public int dustID;
122         public int radiationGunID;
123         public int radiationBalletID;
124
125         /**
126          * the BlockID.
127          */
128         public int pyrolysisTableID;
129         public int electrolysisTableID;
130         public int chemicalConbinationTableID;
131         public int toolAndWeaponCraftingTableID;
132         public int chemicalCraftingTableID;
133
134         public int[] atomOresID = new int[3];
135
136         /**
137          * the GUIID.
138          */
139         public int guiPyrolysisTableID;
140         public int guiElectrolysisTableID;
141         public int guiChemicalCombinationTableID;
142         public int guiToolAndWeaponCraftingTableID;
143         public int guiChemicalCraftingTableID;
144
145         /**
146          * Variables of Block type.
147          */
148         public Block blockPyrolysisTable;
149         public Block blockElectrolysisTable;
150         public Block blockChemicalCombinationTable;
151         public Block blockToolAndWeaponCraftingTable;
152         public Block blockChemicalCraftingTable;
153
154         public Block[] blockAtomOres = new Block[atomOresID.length];
155
156         /**
157          * Variables of Block type.
158          */
159         public Item itemAtoms;
160         public Item itemCompounds;
161         public Item itemGasCollectingBottle;
162         public Item itemAtomGrenade;
163         public Item itemChemicalCells;
164         public Item itemDust;
165         public Item itemRadiationGun;
166         public Item itemRadiationBallet;
167
168         /**
169          * this is Textures Path on ChemiCraft.
170          */
171         public final String ITEM_ATOMS_TEXTURE = "/pcc/chemicraft/items/Atoms.png";
172         public final String ITEM_COMPOUNDS_TEXTURE = "/pcc/chemicraft/items/Compounds.png";
173         public final String ITEM_VEGETABLES_TEXTURE = "/pcc/chemicraft/items/Vegetables.png";
174         public final String ITEM_TEXTURE = "/pcc/chemicraft/items/items.png";
175         public final String BLOCK_CHEMICAL_CRAFTING_TABLE_TEXTURE = "/pcc/chemicraft/blocks/cctable.png";
176         public final String BLOCK_ATOMS_ORE_TEXTURE = "/pcc/chemicraft/blocks/AtomsOre.png";
177         public final String BLOCK_VEGETABLES_TEXTURE = "/pcc/chemicraft/blocks/Vegetables.png";
178         public final String GUI_PYROLYSIS_TEXTURE = "/pcc/chemicraft/guis/Pyrolysis.png";
179         public final String GUI_ELECTROLYSIS_TEXTURE = "/pcc/chemicraft/guis/Electrolysis.png";
180         public final String GUI_CHEMICALCOMBINATION_TEXTURE = "/pcc/chemicraft/guis/ChemicalCombination.png";
181         public final String GUI_TOOLANDWEAPONCRAFTING_TEXTURE = "/pcc/chemicraft/guis/ToolAndWeaponCrafting.png";
182         public final String GUI_CHEMICALCRAFTING_TEXTURE = "/pcc/chemicraft/guis/MaterialCrafting.png";
183         public final String ENTITY_PARTICLE_TEXRURE = "/pcc/chemicraft/entityParticles/dust.png";
184
185         /**
186          *These Instances required on ChemiCraft.
187          */
188         public Auxiliary auxiliary = new Auxiliary();
189         public NameAuxiliary nameAuxiliary = new NameAuxiliary();
190         public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();
191
192         public ChemiCraftAPI api = ChemiCraftAPI.instance();
193         public static final ChemiCraftData chemicalData = new ChemiCraftData();
194
195         /**
196          * this is Thread on ChemiCraft.
197          */
198         private Thread thread;
199
200         /**
201          * the Event Instance.
202          */
203         private FMLPostInitializationEvent event;
204
205         /**
206          * the Register Instances.
207          */
208         public ChemiCraftRegisterBlock registerBlock;
209         public ChemiCraftRegisterItem registerItem;
210         public ChemiCraftRegisterTileEntity registerTileEntity;
211         public ChemiCraftRegisterRecipe registerRecipe;
212         public ChemiCraftRegisterChemicalRecipe registerChemicalRecipe;
213         public ChemiCraftRegisterCompounds registerCompounds;
214         public ChemiCraftRegisterCompoundsHandler registerCompoundsHandler;
215         public ChemiCraftRegisterEntitys registerEntitys;
216
217         public ChemiCraft() {
218                 this.registerBlock = new ChemiCraftRegisterBlock(this);
219                 this.registerItem = new ChemiCraftRegisterItem(this);
220                 this.registerTileEntity = new ChemiCraftRegisterTileEntity(this);
221                 this.registerRecipe = new ChemiCraftRegisterRecipe(this);
222                 this.registerChemicalRecipe = new ChemiCraftRegisterChemicalRecipe(this);
223                 this.registerCompounds = new ChemiCraftRegisterCompounds(this);
224                 this.registerCompoundsHandler = new ChemiCraftRegisterCompoundsHandler(this);
225                 this.registerEntitys = new ChemiCraftRegisterEntitys(this);
226         }
227
228         /**
229          * PreInit:
230          * Configをロードします。
231          * @param event アノテーション呼び出しにより呼び出す必要なし
232          */
233         @PreInit
234         public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {
235                 Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
236                 cfg.load();
237
238                 Property baseBlockID = cfg.get("BlockID", "Base of Block ID", 2400);
239                 Property baseItemID = cfg.get("ItemID", "Base of Item ID", 25000);
240
241                 ChemiCraftConfiguration ccfgBlock = new ChemiCraftConfiguration(baseBlockID.getInt());
242                 ChemiCraftConfiguration ccfgItem = new ChemiCraftConfiguration(baseBlockID.getInt());
243
244                 this.pyrolysisTableID = ccfgBlock.additionID();
245                 this.electrolysisTableID = ccfgBlock.additionID();
246                 this.chemicalConbinationTableID = ccfgBlock.additionID();
247                 this.toolAndWeaponCraftingTableID = ccfgBlock.additionID();
248                 this.chemicalCraftingTableID = ccfgBlock.additionID();
249                 for (int i = 0; i < atomOresID.length; i++) {
250                         this.atomOresID[i] = ccfgBlock.additionID();
251                 }
252
253                 this.atomsID = ccfgItem.additionID();
254                 this.compoundsID = ccfgItem.additionID();
255                 this.gasCollectingBottleID = ccfgItem.additionID();
256                 this.atomGrenadeID = ccfgItem.additionID();
257                 this.chemicalCellsID = ccfgItem.additionID();
258                 this.dustID = ccfgItem.additionID();
259                 this.radiationGunID = ccfgItem.additionID();
260                 this.radiationBalletID = ccfgItem.additionID();
261
262                 Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
263                 Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
264                 Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
265                 Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
266                 Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
267
268                 this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
269                 this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
270                 this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
271                 this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
272                 this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
273
274                 /*
275                 Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
276                 Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
277                 Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
278                 Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);
279                 Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);
280
281                 Property[] atomOresIDProp = new Property[this.atomOresID.length];
282                 for (int i = 0; i < atomOresIDProp.length; i++) {
283                         atomOresIDProp[i] = cfg.getBlock("AtomsOreID:" + i, 2500 + i);
284                 }
285
286                 Property atomsIDProp = cfg.getItem("AtomsID", 25000);
287                 Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);
288                 Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);
289                 Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);
290                 Property chemicalCellsIDProp = cfg.getItem("ChemicalCellID", 25004);
291                 Property dustIDProp = cfg.getItem("DustID", 25005);
292                 Property radiationGunIDProp = cfg.getItem("RadiationGunID", 25006);
293                 Property radiationBalletIDProp = cfg.getItem("RadiationBalletID", 25007);
294
295                 Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
296                 Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
297                 Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
298                 Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
299                 Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
300
301
302                 this.pyrolysisTableID = pyrolysisTableIDProp.getInt();
303                 this.electrolysisTableID = electrolysisTableIDProp.getInt();
304                 this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();
305                 this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();
306                 this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();
307                 for (int i = 0; i < atomOresID.length; i++) {
308                         this.atomOresID[i] = atomOresIDProp[i].getInt();
309                 }
310
311                 this.atomsID = atomsIDProp.getInt();
312                 this.compoundsID = compoundsIDProp.getInt();
313                 this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();
314                 this.atomGrenadeID = atomGrenadeIDProp.getInt();
315                 this.chemicalCellsID = chemicalCellsIDProp.getInt();
316                 this.dustID = dustIDProp.getInt();
317                 this.radiationGunID = radiationGunIDProp.getInt();
318                 this.radiationBalletID = radiationBalletIDProp.getInt();
319
320                 this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
321                 this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
322                 this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
323                 this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
324                 this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
325                 */
326
327                 cfg.save();
328         }
329
330
331
332         @ServerStarting
333         public void serverStarting(final FMLServerStartingEvent event) {
334                 event.registerServerCommand(new CommandSetTile());
335                 event.registerServerCommand(new CommandDeleteItem());
336                 event.registerServerCommand(new CommandGenDebugRoom());
337         }
338
339
340
341         @PostInit
342         public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {
343                 this.thread = new Thread(this);
344                 this.event = event;
345                 this.thread.start();
346
347                 try {
348                         this.thread.join();
349                 } catch (InterruptedException e) {
350                         e.printStackTrace();
351                 }
352
353                 proxy.registerRenderInformation();
354                 Thread.yield();
355         }
356
357
358
359         @Override
360         public void run() {
361                 while (true) {
362                         if (proxy != null && instance != null) {
363                                 this.settingProcessing(event);
364                                 this.apiProcessing(event);
365                                 this.debug(event);
366                                 break;
367                         }
368                 }
369         }
370
371
372
373         private void settingProcessing(final FMLPostInitializationEvent event) {
374
375                 this.registerBlock.start();
376                 this.registerItem.start();
377                 this.registerTileEntity.start();
378                 this.registerRecipe.start();
379                 this.registerChemicalRecipe.start();
380                 this.registerCompounds.start();
381                 this.registerCompoundsHandler.start();
382                 this.registerEntitys.start();
383
384                 // GUIを追加します
385                 NetworkRegistry.instance().registerGuiHandler(instance, proxy);
386
387                 //電池を追加します
388                 this.api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
389                 this.api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
390
391                 this.api.addPyrolysisDecompositionFuel(new ItemStack(Item.coal), 2000*8);
392         }
393
394
395
396         private void apiProcessing(final FMLPostInitializationEvent event) {
397                 // API用の処理
398                 for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++)
399                 {
400                         for (int j = 0; j < api.getAtomOresName().sizeElementsList(api.getAtomOresName().getKeyList(i)); j++)
401                         {
402                                 this.nameAuxiliary.addName(new ItemStack(blockAtomOres[i / 16], 0, i - i / 16 * 16), api.getAtomOresLanguage().get(api.getAtomOresName().getKeyList(i), j), api.getAtomOresName().get(api.getAtomOresName().getKeyList(i), j));
403                                 OreDictionary.registerOre("ore" + api.getAtomOresName().getKeyList(i), new ItemStack(blockAtomOres[i / 16], 1, i - i / 16 * 16));
404                         }
405                 }
406
407                 for (int i = 0; i < api.getAtomOres().size(); i++)
408                 {
409                         GameRegistry.registerWorldGenerator(api.getAtomOres().get(i));
410                 }
411
412                 for (int i = 0; i < api.getChemicalCellsName().sizeKeysList(); i++)
413                 {
414                         for (int j = 0; j < api.getChemicalCellsName().sizeElementsList(api.getChemicalCellsName().getKeyList(i)); j++)
415                         {
416                                 this.nameAuxiliary.addName(new ItemStack(itemChemicalCells, 0, i), api.getChemicalCellsLanguage().get(api.getChemicalCellsName().getKeyList(i), j), api.getChemicalCellsName().get(api.getChemicalCellsName().getKeyList(i), j));
417                         }
418                 }
419
420                 for (int i = 0; i < api.getCompoundsName().sizeKeysList(); i++)
421                 {
422                         for (int j = 0; j < api.getCompoundsName().sizeElementsList(api.getCompoundsName().getKeyList(i)); j++)
423                         {
424                                 this.nameAuxiliary.addName(new ItemStack(itemCompounds, 0, i), api.getCompoundsLang().get(api.getCompoundsName().getKeyList(i), j), api.getCompoundsName().get(api.getCompoundsName().getKeyList(i), j));
425                         }
426                 }
427
428         }
429
430
431
432         private void debug(final FMLPostInitializationEvent event) {
433                 this.proxy.registerTickHandler();
434                 this.api.addCompound("Debug");
435                 this.api.settingCompoundHandler("Debug", new CompoundDebug());
436
437                 this.api.addToolAndWeaponRecipe(new ItemStack[] {
438                                 new ItemStack(Block.stone, 1, 1)
439                 },
440                 new ItemStack(Block.dirt, 1, 0));
441
442         }
443
444 }