OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBaseRecipe.java
1 package pcc.chemicraft.base;
2
3 import net.minecraft.block.Block;
4 import net.minecraft.item.Item;
5 import net.minecraft.item.ItemStack;
6 import net.minecraftforge.oredict.OreDictionary;
7 import pcc.chemicraft.core.ChemiCraftCore;
8 import pcc.chemicraft.util.Formula;
9 import pcc.chemicraft.util.NBTRecipeGrenade;
10
11 public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
12
13         public ChemiCraftRegisterBaseRecipe(ChemiCraftBase mod) {
14                 super(mod);
15         }
16
17         @Override
18         public void start() {
19
20                 /*
21                  * 化合物のレシピ
22                  */
23                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")), new Formula("NaOH"));
24                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")), new Formula("HO2Cl"));
25
26                 /*
27                  * 既存物のレシピ
28                  */
29                 // Block
30                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone), new Formula("SiO2"));
31                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt), new Formula("SiI2O2"));
32                 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood), new Formula("C6H10O5"));
33                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass), new Formula("SiCO2"));
34                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt), new Formula("C7H5N3O6"));
35
36                 // Item
37                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater), new Formula("H2O"));
38                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0), new Formula("H2O"));
39                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar), new Formula("C12H22O11"));
40
41                 // 鉱石
42                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Formula("C"));
43                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal), new Formula("C"));
44                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond), 
45                                 new Formula("C64Si16"));
46                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald), new Formula("Be3Al2Si6O18"));
47
48                 /*
49                  * 他Mod使用時レシピ
50                  */
51                 this.mod.api.addPyrolysisDecompositionRecipe(
52                                 OreDictionary.getOres("oreCopper"), new Formula("Cu"));
53
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                 /*
75                  * 分解台のレシピ
76                  */
77                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
78                                 new Formula("H2O"));
79
80                 for (int i = 0; i < this.mod.apiBase.getAtomOresName().sizeKeysList(); i++){
81                         this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
82                         this.mod.apiBase.getAtomOresFormulas().get(this.mod.apiBase.getAtomOresName().getKeyList(i)));
83                 }
84
85
86         }
87
88 }