OSDN Git Service

653365fce3a92c02f1dba39e149d0b83041fb749
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBaseRecipe.java
1 package pcc.chemicraft.base;
2
3 import cpw.mods.fml.common.registry.GameRegistry;
4 import net.minecraft.block.Block;
5 import net.minecraft.item.Item;
6 import net.minecraft.item.ItemStack;
7 import net.minecraftforge.oredict.OreDictionary;
8 import pcc.chemicraft.core.ChemiCraftCore;
9 import pcc.chemicraft.util.Formula;
10 import pcc.chemicraft.util.NBTRecipeGrenade;
11
12 public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
13
14         public ChemiCraftRegisterBaseRecipe(ChemiCraftBase mod) {
15                 super(mod);
16         }
17
18         @Override
19         public void start() {
20
21                 /*
22                  * 化合物のレシピ
23                  */
24                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")), new Formula("NaOH"));
25                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")), new Formula("HO2Cl"));
26
27                 /*
28                  * 既存物のレシピ
29                  */
30                 // Block
31                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone), new Formula("SiO2"));
32                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt), new Formula("SiI2O2"));
33                 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood), new Formula("C6H10O5"));
34                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass), new Formula("SiCO2"));
35                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt), new Formula("C7H5N3O6"));
36
37                 // Item
38                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater), new Formula("H2O"));
39                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0), new Formula("H2O"));
40                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar), new Formula("C12H22O11"));
41
42                 // 鉱石
43                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Formula("C"));
44                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal), new Formula("C"));
45                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond), 
46                                 new Formula("C64Si16"));
47                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald), new Formula("Be3Al2Si6O18"));
48
49                 /*
50                  * 他Mod使用時レシピ
51                  */
52                 this.mod.api.addPyrolysisDecompositionRecipe(
53                                 OreDictionary.getOres("oreCopper"), new Formula("Cu"));
54
55                 /*
56                  * 素材制作代のレシピ
57                  */
58                 //手榴弾の追加
59                 this.mod.api.addMaterialRecipe(new ItemStack[] {
60                                 null,
61                                 new ItemStack(Block.stone),
62                                 null,
63                                 new ItemStack(Block.stone),
64                                 new ItemStack(Item.gunpowder),
65                                 new ItemStack(Block.stone),
66                                 null,
67                                 new ItemStack(Block.stone),
68                                 null
69                 },
70                 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
71                 new NBTRecipeGrenade()
72                                 );
73
74                 this.mod.api.addSharplessMaterialRecipe(new ItemStack[] {
75                                 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
76                 },
77                 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
78                 new NBTRecipeGrenade()
79                                 );
80
81                 /*
82                  * 分解台のレシピ
83                  */
84                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
85                                 new Formula("H2O"));
86
87                 for (int i = 0; i < this.mod.apiBase.getAtomOresName().sizeKeysList(); i++){
88                         this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
89                         this.mod.apiBase.getAtomOresFormulas().get(this.mod.apiBase.getAtomOresName().getKeyList(i)));
90                 }
91
92
93         }
94
95 }