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.core.ChemiCraftCore;
10 import pcc.chemicraft.core.nbt.NBTRecipeGrenade;
11 import pcc.chemicraft.util.Formula;
15 * @author mozipi,ponkotate
17 public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
19 public ChemiCraftRegisterBaseRecipe(ChemiCraftBase mod) {
26 this.mod.api.addChemicalCombinationRecipe(
27 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")),
30 this.mod.api.addChemicalCombinationRecipe(
31 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("ChlorousAcid")),
32 new Formula("HO2Cl"));
35 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond),
36 new Formula("C64Si16"));
38 this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar),
39 new Formula("C12H22O11"));
41 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater),
44 this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
47 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
50 this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal),
53 this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood),
54 new Formula("C6H10O5"));
56 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt),
57 new Formula("SiI2O2"));
59 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass),
60 new Formula("SiCO2"));
62 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone),
65 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt),
66 new Formula("C7H5N3O6"));
68 this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald),
69 new Formula("Be3Al2Si6O18"));
73 //RP2-------------------------------------------------------------------------------------------------------------
74 this.mod.api.addPyrolysisDecompositionRecipe(
75 OreDictionary.getOres("oreCopper"), new Formula("Cu"));
76 //------------------------------------------------------------------------------------------------------------------
79 this.mod.api.addMaterialRecipe(
82 new ItemStack(Block.stone),
84 new ItemStack(Block.stone),
85 new ItemStack(Item.gunpowder),
86 new ItemStack(Block.stone),
88 new ItemStack(Block.stone),
91 new ItemStack(this.mod.itemAtomGrenade, 16, 0),
92 new NBTRecipeGrenade());
94 this.mod.api.addSharplessMaterialRecipe(
96 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
98 new ItemStack(this.mod.itemAtomGrenade, 1, 0),
99 new NBTRecipeGrenade()
103 this.mod.api.addElectrolysisDecompositionRecipe(
104 new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
108 Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
109 while (arrayOreNames.hasNext()) {
110 String name = arrayOreNames.next();
113 itemstack = OreDictionary.getOres(name).get(0);
114 } catch (IndexOutOfBoundsException e) {
115 int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
116 itemstack = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
118 this.mod.api.addPyrolysisDecompositionRecipe(
120 this.mod.apiBase.getAtomOresFormulas().get(name));