OSDN Git Service

コミットしろやっていわれたので
[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), new Formula("C64Si16"));
45                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald), new Formula("Be3Al2Si6O18"));
46
47                 /*
48                  * 他Mod使用時レシピ
49                  */
50                 this.mod.api.addPyrolysisDecompositionRecipe(
51                                 OreDictionary.getOres("oreCopper"), new Formula("Cu"));
52
53                 /*
54                  * 素材制作代のレシピ
55                  */
56
57                 //手榴弾の追加
58                 this.mod.api.addMaterialRecipe(new ItemStack[] {
59                                 null,
60                                 new ItemStack(Block.stone),
61                                 null,
62                                 new ItemStack(Block.stone),
63                                 new ItemStack(Item.gunpowder),
64                                 new ItemStack(Block.stone),
65                                 null,
66                                 new ItemStack(Block.stone),
67                                 null
68                 },
69                 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
70                 new NBTRecipeGrenade()
71                                 );
72
73                 /*
74                  * 分解台のレシピ
75                  */
76                 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
77                                 new Formula("H2O"));
78
79                 for (int i = 0; i < this.mod.apiBase.getAtomOresName().sizeKeysList(); i++){
80                         this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
81                         this.mod.apiBase.getAtomOresFormulas().get(this.mod.apiBase.getAtomOresName().getKeyList(i)));
82                 }
83
84
85         }
86
87 }