OSDN Git Service

大規模なソース仕様変更
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ChemiCraftRegisterRecipe.java
1 package pcc.chemicraft;
2
3 import net.minecraft.block.Block;
4 import net.minecraft.item.Item;
5 import net.minecraft.item.ItemStack;
6 import pcc.chemicraft.util.NBTRecipeGrenade;
7 import cpw.mods.fml.common.registry.GameRegistry;
8
9 public class ChemiCraftRegisterRecipe extends ChemiCraftRegister {
10
11         public ChemiCraftRegisterRecipe(ChemiCraft mod) {
12                 super(mod);
13         }
14
15         @Override
16         public void start() {
17
18                 /*
19                  * 科学作業台のレシピ
20                  */
21                 GameRegistry.addRecipe(new ItemStack(this.mod.blockPyrolysisTable),
22                                 new Object[]{
23                         "XYX", "ZAZ", "ZZZ",
24                         Character.valueOf('X'), new ItemStack(Item.ingotIron),
25                         Character.valueOf('Y'), new ItemStack(Block.workbench),
26                         Character.valueOf('Z'), new ItemStack(Block.stone),
27                         Character.valueOf('A'), new ItemStack(Item.bucketLava),
28                 });
29
30                 GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCombinationTable),
31                                 new Object[]{
32                         "XYX", "ZAZ", "ZZZ",
33                         Character.valueOf('X'), new ItemStack(Item.ingotIron),
34                         Character.valueOf('Y'), new ItemStack(Block.workbench),
35                         Character.valueOf('Z'), new ItemStack(Block.stone),
36                         Character.valueOf('A'), new ItemStack(Block.obsidian),
37                 });
38
39                 GameRegistry.addRecipe(new ItemStack(this.mod.blockToolAndWeaponCraftingTable),
40                                 new Object[]{
41                         "XYX", "ZAZ", "ZZZ",
42                         Character.valueOf('X'), new ItemStack(Item.ingotIron),
43                         Character.valueOf('Y'), new ItemStack(Block.workbench),
44                         Character.valueOf('Z'), new ItemStack(Block.stone),
45                         Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
46                 });
47
48                 GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCraftingTable),
49                                 new Object[]{
50                         "XYX", "ZAZ", "ZZZ",
51                         Character.valueOf('X'), new ItemStack(Item.ingotIron),
52                         Character.valueOf('Y'), new ItemStack(Block.workbench),
53                         Character.valueOf('Z'), new ItemStack(Block.stone),
54                         Character.valueOf('A'), new ItemStack(this.mod.itemAtoms, 1, 0),
55                 });
56
57                 /*
58                  * 化合物のレシピ
59                  */
60                 this.mod.api.addChemicalCombinationRecipe(new String[]{"Na", "O", "H"}, new Integer[]{1, 1, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")));
61                 this.mod.api.addChemicalCombinationRecipe(new String[]{"H", "O", "Cl"}, new Integer[]{1, 2, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")));
62                 this.mod.api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("Water")));
63
64                 /*
65                  * 素材制作代のレシピ
66                  */
67
68                 //化学電池の追加
69                 this.mod.api.addMaterialRecipe(new ItemStack[] {
70                                 null,
71                                 null,
72                                 null,
73                                 new ItemStack(this.mod.itemAtoms, 1, this.mod.chemicalData.ZINC),
74                                 null,
75                                 new ItemStack(this.mod.itemAtoms, 1, this.mod.chemicalData.COPPER),
76                                 new ItemStack(Item.bucketWater),
77                                 new ItemStack(Item.bucketWater),
78                                 new ItemStack(Item.bucketWater),
79                 },
80                 new ItemStack(this.mod.itemChemicalCells, 1, 0),
81                 null);
82
83                 //手榴弾の追加
84                 this.mod.api.addMaterialRecipe(new ItemStack[] {
85                                 null,
86                                 new ItemStack(Block.stone),
87                                 null,
88                                 new ItemStack(Block.stone),
89                                 new ItemStack(Item.gunpowder),
90                                 new ItemStack(Block.stone),
91                                 null,
92                                 new ItemStack(Block.stone),
93                                 null
94                 },
95                 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
96                 new NBTRecipeGrenade()
97                                 );
98
99                 /*
100                  * 熱分解台のレシピ
101                  */
102                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
103                                 new Integer[] {ChemiCraftData.HYDROGEN, this.mod.chemicalData.OXYGEN},
104                                 new Integer[] {2, 1});
105
106                 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.itemCompounds, 1, this.mod.api.getCompound("Water")),
107                                 new Integer[] {ChemiCraftData.HYDROGEN, this.mod.chemicalData.OXYGEN},
108                                 new Integer[] {2, 1});
109
110                 for (int i = 0; i < this.mod.api.getAtomOresName().sizeKeysList(); i++){
111                         this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
112                                         this.mod.api.getAtomOresAtoms().get(this.mod.api.getAtomOresName().getKeyList(i)),
113                                         this.mod.api.getAtomOresAmounts().get(this.mod.api.getAtomOresName().getKeyList(i)));
114                 }
115
116
117         }
118
119 }