1 package pcc.chemicraft.base;
3 import java.util.Iterator;
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.ChemiCraftAPI;
11 import pcc.chemicraft.core.ChemiCraftCore;
12 import pcc.chemicraft.core.nbt.NBTRecipeGrenade;
13 import pcc.chemicraft.util.Formula;
17 * @author mozipi,ponkotate
19 public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
21 public ChemiCraftRegisterBaseRecipe(ChemiCraftBase mod) {
29 this.mod.api.addChemicalCombinationRecipe(
30 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")),
33 this.mod.api.addChemicalCombinationRecipe(
34 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")),
35 new Formula("HO2Cl"));
38 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond),
39 new Formula("C64Si16"));
41 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar),
42 new Formula("C12H22O11"));
44 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.bucketWater),
47 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.potion, 1, 0),
50 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
53 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal),
56 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
59 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotIron),
62 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.blockSteel),
65 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
68 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotGold),
71 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockGold),
74 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood),
75 new Formula("C6H10O5"));
77 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt),
78 new Formula("SiI2O2"));
80 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass),
81 new Formula("SiCO2"));
83 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone),
86 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt),
87 new Formula("C7H5N3O6"));
89 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald),
90 new Formula("Be3Al2Si6O18"));
94 //RP2-------------------------------------------------------------------------------------------------------------
95 this.mod.api.addPyrolysisDecompositionRecipe(
96 OreDictionary.getOres("oreCopper"), new Formula("Cu"));
97 //------------------------------------------------------------------------------------------------------------------
100 this.mod.api.addMaterialRecipe(
102 null, new ItemStack(Block.stone), null,
103 new ItemStack(Block.stone), new ItemStack(Item.gunpowder), new ItemStack(Block.stone),
104 null, new ItemStack(Block.stone), null
106 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
107 new NBTRecipeGrenade());
109 this.mod.api.addSharplessMaterialRecipe(
111 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
113 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
114 new NBTRecipeGrenade()
117 ChemiCraftAPI.addMaterialRecipe(
119 new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
120 new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
121 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
123 new ItemStack(this.mod.itemRadiationBallet),
126 ChemiCraftAPI.addMaterialRecipe(
128 new ItemStack(Block.stone), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Block.stone),
129 new ItemStack(Item.ingotIron), new ItemStack(Item.redstone), new ItemStack(Item.ingotIron),
130 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
132 new ItemStack(this.mod.itemRaditionGunDataChip),
135 ChemiCraftAPI.addMaterialRecipe(
137 new ItemStack(Block.blockSteel), new ItemStack(Block.blockSteel), new ItemStack(this.mod.itemRaditionGunDataChip),
138 null, null, new ItemStack(Block.stone),
139 null, null, new ItemStack(Item.stick)
141 new ItemStack(this.mod.itemRadiationGun),
145 this.mod.api.addElectrolysisDecompositionRecipe(
146 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
150 Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
151 for (int i = 0; arrayOreNames.hasNext(); i++) {
152 String name = arrayOreNames.next();
156 ingot = OreDictionary.getOres("ingot" + name).get(0);
157 ore = OreDictionary.getOres("ore" + name).get(0);
158 } catch (IndexOutOfBoundsException e) {
159 int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
160 ingot = new ItemStack(this.mod.itemAtomIngots, 1, i);
161 ore = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
163 this.mod.api.addPyrolysisDecompositionRecipe(
165 this.mod.apiBase.getAtomOresFormulas().get(name));
166 this.mod.api.addPyrolysisDecompositionRecipe(
168 this.mod.apiBase.getAtomOresFormulas().get(name));