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("C4096Si64"));
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.addReversibleOfPyrolysis(new ItemStack(Item.coal),
53 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
56 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotIron),
59 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
62 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockSteel),
65 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotGold),
68 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
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"));
92 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreEmerald),
93 new Formula("Be3Al2Si6O18"));
98 this.mod.api.addMaterialRecipe(
100 null, new ItemStack(Block.stone), null,
101 new ItemStack(Block.stone), new ItemStack(Item.gunpowder), new ItemStack(Block.stone),
102 null, new ItemStack(Block.stone), null
104 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
105 new NBTRecipeGrenade());
107 this.mod.api.addSharplessMaterialRecipe(
109 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
111 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
112 new NBTRecipeGrenade()
115 ChemiCraftAPI.addMaterialRecipe(
117 new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
118 new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
119 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
121 new ItemStack(this.mod.itemRadiationBallet),
124 ChemiCraftAPI.addMaterialRecipe(
126 new ItemStack(Block.stone), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Block.stone),
127 new ItemStack(Item.ingotIron), new ItemStack(Item.redstone), new ItemStack(Item.ingotIron),
128 new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
130 new ItemStack(this.mod.itemRaditionGunDataChip),
133 ChemiCraftAPI.addMaterialRecipe(
135 new ItemStack(Block.blockSteel), new ItemStack(Block.blockSteel), new ItemStack(this.mod.itemRaditionGunDataChip),
136 null, null, new ItemStack(Block.stone),
137 null, null, new ItemStack(Item.stick)
139 new ItemStack(this.mod.itemRadiationGun),
143 this.mod.api.addElectrolysisDecompositionRecipe(
144 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
148 Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
149 for (int i = 0; arrayOreNames.hasNext(); i++) {
150 String name = arrayOreNames.next();
154 ingot = OreDictionary.getOres("ingot" + name).get(0);
155 ore = OreDictionary.getOres("ore" + name).get(0);
156 } catch (IndexOutOfBoundsException e) {
157 int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
158 ingot = new ItemStack(this.mod.itemAtomIngots, 1, i);
159 ore = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
161 this.mod.api.addPyrolysisDecompositionRecipe(
163 this.mod.apiBase.getAtomOresFormulas().get(name));
164 this.mod.api.addPyrolysisDecompositionRecipe(
166 this.mod.apiBase.getAtomOresFormulas().get(name));