OSDN Git Service

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