OSDN Git Service

・mcmod.info修正
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBaseRecipe.java
1 package pcc.chemicraft.base;
2
3 import java.util.Iterator;
4
5 import net.minecraft.block.Block;
6 import net.minecraft.item.Item;
7 import net.minecraft.item.ItemStack;
8 import net.minecraftforge.oredict.OreDictionary;
9 import pcc.chemicraft.ChemiCraftData;
10 import pcc.chemicraft.core.ChemiCraftCore;
11 import pcc.chemicraft.core.nbt.NBTRecipeGrenade;
12 import pcc.chemicraft.util.Formula;
13
14 /**
15  * レシピを追加します
16  * @author mozipi,ponkotate
17  */
18 public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
19
20         public ChemiCraftRegisterBaseRecipe(ChemiCraftBase mod) {
21                 super(mod);
22         }
23
24         @Override
25         public void start() {
26
27                 //化合物のレシピ
28                 this.mod.api.addChemicalCombinationRecipe(
29                                 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")),
30                                 new Formula("NaOH"));
31
32                 this.mod.api.addChemicalCombinationRecipe(
33                                 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")),
34                                 new Formula("HO2Cl"));
35
36                 //既存物のレシピ
37                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond),
38                                 new Formula("C4096Si64"));
39
40                 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar),
41                                 new Formula("C12H22O11"));
42
43                 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.bucketWater),
44                                 new Formula("H2O"));
45
46                 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.potion, 1, 0),
47                                 new Formula("H2O"));
48
49                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.coal),
50                                 new Formula("C64"));
51
52                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
53                                 new Formula("C"));
54
55                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotIron),
56                                 new Formula("Fe"));
57
58                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
59                                 new Formula("Fe"));
60
61                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockSteel),
62                                 new Formula("9Fe"));
63
64                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotGold),
65                                 new Formula("Au"));
66
67                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
68                                 new Formula("Au"));
69
70                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockGold),
71                                 new Formula("9Au"));
72
73                 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood),
74                                 new Formula("C6H10O5"));
75
76                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt),
77                                 new Formula("SiI2O2"));
78
79                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass),
80                                 new Formula("SiCO2"));
81
82                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone),
83                                 new Formula("SiO2"));
84
85                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt),
86                                 new Formula("C7H5N3O6"));
87
88                 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald),
89                                 new Formula("Be3Al2Si6O18"));
90
91                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreEmerald),
92                                 new Formula("Be3Al2Si6O18"));
93
94
95
96                 //素材制作台のレシピ
97                 this.mod.api.addMaterialRecipe(
98                                 new ItemStack[] {
99                                                 null, new ItemStack(Block.stone), null,
100                                                 new ItemStack(Block.stone), new ItemStack(Item.gunpowder), new ItemStack(Block.stone),
101                                                 null, new ItemStack(Block.stone), null
102                                 },
103                                 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
104                                 new NBTRecipeGrenade());
105
106                 this.mod.api.addSharplessMaterialRecipe(
107                                 new ItemStack[] {
108                                                 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
109                                 },
110                                 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
111                                 new NBTRecipeGrenade()
112                                 );
113
114                 this.mod.api.addSharplessMaterialRecipe(
115                                 new ItemStack[] {
116                                                 new ItemStack(Item.dyePowder, 1, 0),
117                                                 new ItemStack(Item.egg),
118                                 },
119                                 new ItemStack(this.mod.itemBlackSmoke),
120                                 null
121                                 );
122
123                 this.mod.api.addSharplessMaterialRecipe(
124                                 new ItemStack[] {
125                                                 new ItemStack(Item.gunpowder),
126                                                 new ItemStack(Item.egg),
127                                 },
128                                 new ItemStack(this.mod.itemDust),
129                                 null
130                                 );
131
132                 this.mod.api.addMaterialRecipe(
133                                 new ItemStack[] {
134                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
135                                                 new ItemStack(Item.ingotIron),
136                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
137                                                 new ItemStack(Item.ingotIron),
138                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
139                                                 new ItemStack(Item.ingotIron),
140                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("He")),
141                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Sn")),
142                                                 new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("He")),
143                                 },
144                                 new ItemStack(this.mod.itemOreSearcher),
145                                 null);
146
147                 this.mod.api.addMaterialRecipe(
148                                 new ItemStack[] {
149                                                 new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
150                                                 new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
151                                                 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
152                                 },
153                                 new ItemStack(this.mod.itemRadiationBallet),
154                                 null);
155
156                 this.mod.api.addMaterialRecipe(
157                                 new ItemStack[] {
158                                                 new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
159                                                 new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
160                                                 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
161                                 },
162                                 new ItemStack(this.mod.itemRadiationBallet),
163                                 null);
164
165                 this.mod.api.addMaterialRecipe(
166                                 new ItemStack[] {
167                                                 new ItemStack(Block.stone), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Block.stone),
168                                                 new ItemStack(Item.ingotIron), new ItemStack(Item.redstone), new ItemStack(Item.ingotIron),
169                                                 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
170                                 },
171                                 new ItemStack(this.mod.itemRaditionGunDataChip),
172                                 null);
173
174                 this.mod.api.addMaterialRecipe(
175                                 new ItemStack[]{
176                                                 new ItemStack(Block.blockSteel), new ItemStack(Block.blockSteel), new ItemStack(this.mod.itemRaditionGunDataChip),
177                                                 null, null, new ItemStack(Block.stone),
178                                                 null, null, new ItemStack(Item.stick)
179                                 },
180                                 new ItemStack(this.mod.itemRadiationGun),
181                                 null);
182
183                 //分解台のレシピ
184                 this.mod.api.addElectrolysisDecompositionRecipe(
185                                 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
186                                 new Formula("H2O"));
187
188                 //鉱石分解の追加
189                 Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
190                 for (int i = 0; arrayOreNames.hasNext(); i++) {
191                         String name = arrayOreNames.next();
192                         ItemStack ingot;
193                         ItemStack ore;
194                         try {
195                                 ingot = OreDictionary.getOres("ingot" + name).get(0);
196                                 ore = OreDictionary.getOres("ore" + name).get(0);
197                         } catch (IndexOutOfBoundsException e) {
198                                 int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
199                                 ingot = new ItemStack(this.mod.itemAtomIngots, 1, i);
200                                 ore = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
201                         }
202                         this.mod.api.addPyrolysisDecompositionRecipe(
203                                         ingot,
204                                         this.mod.apiBase.getAtomOresFormulas().get(name));
205                         this.mod.api.addPyrolysisDecompositionRecipe(
206                                         ore,
207                                         this.mod.apiBase.getAtomOresFormulas().get(name));
208                 }
209         }
210
211 }