OSDN Git Service

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