1 package pcc.chemicraft;
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 net.minecraftforge.oredict.OreDictionary;
11 import pcc.chemicraft.block.BlockChemicalCombinationTable;
12 import pcc.chemicraft.block.BlockChemicalCraftingTable;
13 import pcc.chemicraft.block.BlockElectrolysisTable;
14 import pcc.chemicraft.block.BlockPyrolysisTable;
15 import pcc.chemicraft.block.BlockToolAndWeaponCraftingTable;
16 import pcc.chemicraft.compounds.CompoundDebug;
17 import pcc.chemicraft.compounds.CompoundWater;
18 import pcc.chemicraft.creativetab.CreativeTabAtomOres;
19 import pcc.chemicraft.creativetab.CreativeTabChemiCraft;
20 import pcc.chemicraft.debug.CommandDeleteItem;
21 import pcc.chemicraft.debug.CommandGenDebugRoom;
22 import pcc.chemicraft.debug.CommandSetTile;
23 import pcc.chemicraft.item.ItemAtoms;
24 import pcc.chemicraft.item.ItemAtomsGrenade;
25 import pcc.chemicraft.item.ItemChemiCell;
26 import pcc.chemicraft.item.ItemCompounds;
27 import pcc.chemicraft.item.ItemGasCollectingBottle;
28 import pcc.chemicraft.ore.BlockAtomOres;
29 import pcc.chemicraft.ore.ItemAtomOres;
30 import pcc.chemicraft.system.CommonProxy;
31 import pcc.chemicraft.system.PacketHandler;
32 import pcc.chemicraft.tileentity.TileEntityChemicalCombinationTable;
33 import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
34 import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
35 import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
36 import pcc.chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
37 import pcc.chemicraft.util.Auxiliary;
38 import pcc.chemicraft.util.Auxiliary.ArrayAuxiliary;
39 import pcc.chemicraft.util.Auxiliary.NameAuxiliary;
40 import pcc.chemicraft.util.NBTRecipeGrenade;
41 import cpw.mods.fml.common.Mod;
42 import cpw.mods.fml.common.SidedProxy;
43 import cpw.mods.fml.common.event.FMLPostInitializationEvent;
44 import cpw.mods.fml.common.event.FMLPreInitializationEvent;
45 import cpw.mods.fml.common.event.FMLServerStartingEvent;
46 import cpw.mods.fml.common.network.NetworkMod;
47 import cpw.mods.fml.common.network.NetworkRegistry;
48 import cpw.mods.fml.common.registry.GameRegistry;
54 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")
55 @NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)
56 public class ChemiCraft {
58 public static final String[] ATOMSNAME = {
59 "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",
60 "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",
61 "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",
62 "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",
63 "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",
64 "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",
65 "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",
66 "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };
68 public static final String[] ATOMSNAMEJP = {
69 "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",
70 "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",
71 "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",
72 "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",
73 "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",
74 "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };
79 @Mod.Instance("chemiCraft")
80 public static ChemiCraft instance;
85 @SidedProxy(clientSide = "pcc.chemicraft.client.ClientProxy", serverSide = "pcc.chemicraft.system.CommonProxy")
86 public static CommonProxy proxy;
89 * ChemiCraftのCreativeTab.
91 public static final CreativeTabs creativeTabChemiCraft = new CreativeTabChemiCraft("ChemiCraft");
92 public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomOres("AtomsOre");
98 public int compoundsID;
99 public int gasCollectingBottleID;
100 public int atomGrenadeID;
101 public int chemicalCellsID;
106 public int pyrolysisTableID;
107 public int electrolysisTableID;
108 public int chemicalConbinationTableID;
109 public int toolAndWeaponCraftingTableID;
110 public int chemicalCraftingTableID;
112 public int[] atomOresID = new int[3];
117 public int guiPyrolysisTableID;
118 public int guiElectrolysisTableID;
119 public int guiChemicalCombinationTableID;
120 public int guiToolAndWeaponCraftingTableID;
121 public int guiChemicalCraftingTableID;
126 public Block blockPyrolysisTable;
127 public Block blockElectrolysisTable;
128 public Block blockChemicalCombinationTable;
129 public Block blockToolAndWeaponCraftingTable;
130 public Block blockChemicalCraftingTable;
132 public Block[] blockAtomOres = new Block[atomOresID.length];
137 public Item itemAtoms;
138 public Item itemCompounds;
139 public Item itemGasCollectingBottle;
140 public Item itemAtomGrenade;
141 public Item itemChemicalCells;
144 * このmodで使用するTextureのパス.
146 public final String ITEM_ATOMS_TEXTURE = "/pcc/chemicraft/items/Atoms.png";
147 public final String ITEM_COMPOUNDS_TEXTURE = "/pcc/chemicraft/items/Compounds.png";
148 public final String ITEM_VEGETABLES_TEXTURE = "/pcc/chemicraft/items/Vegetables.png";
149 public final String ITEM_TEXTURE = "/pcc/chemicraft/items/items.png";
150 public final String BLOCK_CHEMICAL_CRAFTING_TABLE_TEXTURE = "/pcc/chemicraft/blocks/cctable.png";
151 public final String BLOCK_ATOMS_ORE_TEXTURE = "/pcc/chemicraft/blocks/AtomsOre.png";
152 public final String BLOCK_VEGETABLES_TEXTURE = "/pcc/chemicraft/blocks/Vegetables.png";
153 public final String GUI_PYROLYSIS_TEXTURE = "/pcc/chemicraft/guis/Pyrolysis.png";
154 public final String GUI_ELECTROLYSIS_TEXTURE = "/pcc/chemicraft/guis/Electrolysis.png";
155 public final String GUI_CHEMICALCOMBINATION_TEXTURE = "/pcc/chemicraft/guis/ChemicalCombination.png";
156 public final String GUI_TOOLANDWEAPONCRAFTING_TEXTURE = "/pcc/chemicraft/guis/ToolAndWeaponCrafting.png";
157 public final String GUI_CHEMICALCRAFTING_TEXTURE = "/pcc/chemicraft/guis/MaterialCrafting.png";
160 * このmodに必要な補助クラスのインスタンス.
162 public Auxiliary auxiliary = new Auxiliary();
163 public NameAuxiliary nameAuxiliary = new NameAuxiliary();
164 public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();
166 private ChemiCraftAPI api = ChemiCraftAPI.instance();
167 private ChemiCraftData chemicalData = new ChemiCraftData();
170 public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {
171 Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
174 Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
175 Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
176 Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
177 Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);
178 Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);
180 Property[] atomOresIDProp = new Property[this.atomOresID.length];
181 for (int i = 0; i < atomOresIDProp.length; i++) {
182 atomOresIDProp[i] = cfg.getBlock("AtomsOreID:" + i, 2500 + i);
185 Property atomsIDProp = cfg.getItem("AtomsID", 25000);
186 Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);
187 Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);
188 Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);
189 Property chemicalCellsIDProp = cfg.getItem("ChemicalCellID", 25004);
191 Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
192 Property guiElectrolysisTableIDProp = cfg.get("GUI", "GUIElectrolysisTableIDProp", 1001);
193 Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1002);
194 Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1003);
195 Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1004);
198 this.pyrolysisTableID = pyrolysisTableIDProp.getInt();
199 this.electrolysisTableID = electrolysisTableIDProp.getInt();
200 this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();
201 this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();
202 this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();
203 for (int i = 0; i < atomOresID.length; i++) {
204 this.atomOresID[i] = atomOresIDProp[i].getInt();
207 this.atomsID = atomsIDProp.getInt();
208 this.compoundsID = compoundsIDProp.getInt();
209 this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();
210 this.atomGrenadeID = atomGrenadeIDProp.getInt();
211 this.chemicalCellsID = chemicalCellsIDProp.getInt();
213 this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
214 this.guiElectrolysisTableID = guiElectrolysisTableIDProp.getInt();
215 this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
216 this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
217 this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
223 public void serverStarting(final FMLServerStartingEvent event) {
224 event.registerServerCommand(new CommandSetTile());
225 event.registerServerCommand(new CommandDeleteItem());
226 event.registerServerCommand(new CommandGenDebugRoom());
230 public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {
231 this.settingProcessing(event);
232 this.apiProcessing(event);
236 private void settingProcessing(final FMLPostInitializationEvent event) {
239 this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).
242 setStepSound(Block.soundStoneFootstep).
243 setBlockName("PyrolysisTable");
244 this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 1, Material.ground).
247 setStepSound(Block.soundStoneFootstep).
248 setBlockName("ElectrolysisTable");
249 this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 2, Material.ground).
252 setStepSound(Block.soundStoneFootstep).
253 setBlockName("ChemicalCombinationTable");
254 this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 3, Material.ground).
257 setStepSound(Block.soundStoneFootstep).
258 setBlockName("ToolAndWeaponCraftingTable");
259 this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.chemicalCraftingTableID, 4, Material.ground).
262 setStepSound(Block.soundStoneFootstep).
263 setBlockName("ChemicalCraftingTable");
265 for (int i = 0; i < blockAtomOres.length; i++)
267 this.blockAtomOres[i] = new BlockAtomOres(this.atomOresID[i]).
270 setStepSound(Block.soundStoneFootstep).
271 setBlockName("AtomsOre" + i);
272 GameRegistry.registerBlock(blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
276 this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");
277 this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");
278 this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
279 this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);
280 this.itemChemicalCells = new ItemChemiCell(this.chemicalCellsID).setItemName("chemiCell").setIconIndex(3);
282 // BlockをMinecraftに登録します
283 GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");
284 GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
285 GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
286 GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
287 GameRegistry.registerBlock(this.blockElectrolysisTable, "BlockElectrolysisTable");
290 this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");
291 this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");
292 this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");
293 this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");
294 this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
295 this.nameAuxiliary.addName(this.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
296 this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ChemicalCraftingTable");
297 this.nameAuxiliary.addName(this.blockChemicalCraftingTable, "ja_JP", "素材製作台");
298 this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");
299 this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");
302 this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);
303 this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);
304 this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");
305 this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");
306 this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");
307 this.nameAuxiliary.addName(this.itemAtomGrenade, "ja_JP", "元素手榴弾");
310 GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");
311 GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");
312 GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");
313 GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");
314 GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");
317 NetworkRegistry.instance().registerGuiHandler(instance, proxy);
320 proxy.registerRenderInformation();
323 GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),
326 Character.valueOf('X'), new ItemStack(Item.ingotIron),
327 Character.valueOf('Y'), new ItemStack(Block.workbench),
328 Character.valueOf('Z'), new ItemStack(Block.stone),
329 Character.valueOf('A'), new ItemStack(Item.bucketLava),
331 GameRegistry.addRecipe(new ItemStack(this.blockChemicalCombinationTable),
334 Character.valueOf('X'), new ItemStack(Item.ingotIron),
335 Character.valueOf('Y'), new ItemStack(Block.workbench),
336 Character.valueOf('Z'), new ItemStack(Block.stone),
337 Character.valueOf('A'), new ItemStack(Block.obsidian),
339 GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),
342 Character.valueOf('X'), new ItemStack(Item.ingotIron),
343 Character.valueOf('Y'), new ItemStack(Block.workbench),
344 Character.valueOf('Z'), new ItemStack(Block.stone),
345 Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
347 GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),
350 Character.valueOf('X'), new ItemStack(Item.ingotIron),
351 Character.valueOf('Y'), new ItemStack(Block.workbench),
352 Character.valueOf('Z'), new ItemStack(Block.stone),
353 Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),
357 api.addChemicalCell(itemChemicalCells, "ChemicalCell", 1000);
358 api.addChemicalCellLanguage("ChemicalCell", "ja_JP", "化学電池");
363 api.addAtomOres("Petalite", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 4, 10}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // LiAlSi4O10
364 api.addAtomOresLanguage("Petalite", "ペタル石", "ja_JP");
365 api.addAtomOres("Spodumene", new String[]{"Li", "Al", "Si", "O"}, new Integer[]{1, 1, 2, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // LiAlSi2O6
366 api.addAtomOresLanguage("Spodumene", "リチア輝石", "ja_JP");
369 api.addAtomOres("Beryl", new String[]{"Be", "Al", "Si", "O"}, new Integer[]{3, 2, 6, 18}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Be3Al2Si6O18
370 api.addAtomOresLanguage("Beryl", "緑柱石", "ja_JP");
371 api.addAtomOres("Chrysoberyl", new String[]{"Be", "Al", "O"}, new Integer[]{1, 2, 4}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // BeAl2O4
372 api.addAtomOresLanguage("Chrysoberyl", "金緑石", "ja_JP");
375 api.addAtomOres("Ulexite", new String[]{"Na", "Ca", "B", "O"}, new Integer[]{1, 1, 5, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // NaCaB5O6(OH)6・5H2O
376 api.addAtomOresLanguage("Ulexite", "ウレキサイト", "ja_JP");
379 api.addAtomOres("Fluorite", new String[]{"Ca", "F"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaF2
380 api.addAtomOresLanguage("Fluorite", "蛍石", "ja_JP");
381 api.addAtomOres("Cryolite", new String[]{"Na", "Al", "F"}, new Integer[]{3, 1, 6}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Na3AlF6
382 api.addAtomOresLanguage("Cryolite", "氷晶石", "ja_JP");
385 api.addAtomOres("RockSalt", new String[]{"Na", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // NaCl
386 api.addAtomOresLanguage("RockSalt", "岩塩", "ja_JP");
389 api.addAtomOres("Dolomite", new String[]{"Ca", "Mg"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaMg(CO3)2
390 api.addAtomOresLanguage("Dolomite", "苦灰石", "ja_JP");
391 api.addAtomOres("Magnesite", new String[]{"Mg", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // MgCO3
392 api.addAtomOresLanguage("Magnesite", "菱苦土石", "ja_JP");
395 api.addAtomOres("Gibbsite", new String[]{"Al"}, new Integer[]{3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al(OH)3
396 api.addAtomOresLanguage("Gibbsite", "ギブス石", "ja_JP");
397 api.addAtomOres("Ruby", new String[]{"Al", "O"}, new Integer[]{2, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al2O3
398 api.addAtomOresLanguage("Ruby", "ルビー", "ja_JP");
399 api.addAtomOres("Sapphire", new String[]{"Al", "O"}, new Integer[]{2, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Al2O3
400 api.addAtomOresLanguage("Sapphire", "サファイア", "ja_JP");
403 api.addAtomOres("Quartz", new String[]{"Si", "O"}, new Integer[]{1, 2}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // SiO2
404 api.addAtomOresLanguage("Quartz", "石英", "ja_JP");
407 api.addAtomOres("Fluorapatite", new String[]{"Ca"}, new Integer[]{5}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3F
408 api.addAtomOresLanguage("Fluorapatite", "フッ素リン灰石", "ja_JP");
409 api.addAtomOres("Chlorapatite", new String[]{"Ca"}, new Integer[]{5}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3Cl
410 api.addAtomOresLanguage("Chlorapatite", "塩素燐灰石", "ja_JP");
411 api.addAtomOres("Hydroxylapatite", new String[]{"Ca"}, new Integer[]{5}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // Ca5(PO4)3(OH)
412 api.addAtomOresLanguage("Hydroxylapatite", "水酸燐灰石", "ja_JP");
415 api.addAtomOres("Sylvite", new String[]{"K", "Cl"}, new Integer[]{1, 1}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // KCl
416 api.addAtomOresLanguage("Sylvite", "カリ岩塩", "ja_JP");
419 api.addAtomOres("Calcite", new String[]{"Ca", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaCO3
420 api.addAtomOresLanguage("Calcite", "方解石", "ja_JP");
422 // api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // 化学式
423 // api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語");
426 this.api.addCompound("ja_JP", "ChlorousAcid", "亜塩素酸");
427 this.api.addCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
428 this.api.addCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
429 this.api.addCompound("ja_JP", "Water", "水");
430 this.api.addCompound("ja_JP", "SodiumChloride", "塩化ナトリウム");
431 this.api.addCompound("ja_JP", "SodiumBicarbonate", "重曹");
434 this.api.settingCompoundHandler("Water", new CompoundWater());
437 this.api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("SodiumChloride")));
438 this.api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("ChlorousAcid")));
439 this.api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")));
442 this.api.addMaterialRecipe(new ItemStack[] {
446 new ItemStack(this.itemAtoms, 1, ChemiCraftData.ZINC),
448 new ItemStack(this.itemAtoms, 1, ChemiCraftData.COPPER),
449 new ItemStack(Item.bucketWater),
450 new ItemStack(Item.bucketWater),
451 new ItemStack(Item.bucketWater),
453 new ItemStack(this.itemChemicalCells, 1, 0),
457 this.api.addMaterialRecipe(new ItemStack[] {
459 new ItemStack(Block.stone),
461 new ItemStack(Block.stone),
462 new ItemStack(Item.gunpowder),
463 new ItemStack(Block.stone),
465 new ItemStack(Block.stone),
468 new ItemStack(this.itemAtomGrenade, 16, 0),
469 new NBTRecipeGrenade()
472 this.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
473 new Integer[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
474 new Integer[] {2, 1});
476 this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.itemCompounds, 1, this.api.getCompound("Water")),
477 new Integer[] {ChemiCraftData.HYDROGEN, ChemiCraftData.OXYGEN},
478 new Integer[] {2, 1});
480 for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++){
481 this.api.addPyrolysisDecompositionRecipe(new ItemStack(this.blockAtomOres[i / 16], 1, i - i / 16 * 16),
482 api.getAtomOresAtoms().get(api.getAtomOresName().getKeyList(i)),
483 api.getAtomOresAmounts().get(api.getAtomOresName().getKeyList(i)));
486 this.api.addPyrolysisDecompositionFuel(new ItemStack(Item.coal), 2000*8);
489 private void apiProcessing(final FMLPostInitializationEvent event) {
491 for (int i = 0; i < api.getAtomOresName().sizeKeysList(); i++)
493 for (int j = 0; j < api.getAtomOresName().sizeElementsList(api.getAtomOresName().getKeyList(i)); j++)
495 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));
496 OreDictionary.registerOre("ore" + api.getAtomOresName().getKeyList(i), new ItemStack(blockAtomOres[i / 16], 1, i - i / 16 * 16));
500 for (int i = 0; i < api.getAtomOres().size(); i++)
502 GameRegistry.registerWorldGenerator(api.getAtomOres().get(i));
505 for (int i = 0; i < api.getChemicalCellsName().sizeKeysList(); i++)
507 for (int j = 0; j < api.getChemicalCellsName().sizeElementsList(api.getChemicalCellsName().getKeyList(i)); j++)
509 this.nameAuxiliary.addName(new ItemStack(itemChemicalCells, 0, i), api.getChemicalCellsLanguage().get(api.getChemicalCellsName().getKeyList(i), j), api.getChemicalCellsName().get(api.getChemicalCellsName().getKeyList(i), j));
513 for (int i = 0; i < api.getCompoundsName().sizeKeysList(); i++)
515 for (int j = 0; j < api.getCompoundsName().sizeElementsList(api.getCompoundsName().getKeyList(i)); j++)
517 this.nameAuxiliary.addName(new ItemStack(itemCompounds, 0, i), api.getCompoundsLang().get(api.getCompoundsName().getKeyList(i), j), api.getCompoundsName().get(api.getCompoundsName().getKeyList(i), j));
523 private void debug(final FMLPostInitializationEvent event) {
525 this.proxy.registerTickHandler();
526 this.api.addCompound("Debug");
527 this.api.settingCompoundHandler("Debug", new CompoundDebug());
532 this.api.addToolAndWeaponRecipe(new ItemStack[] {
533 new ItemStack(Block.stone, 1, 1)
535 new ItemStack(Block.dirt, 1, 0));