OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
[chemicraft/ChemiCraftNext.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBaseRecipe.java
index 6d44420..ed3df5b 100644 (file)
@@ -24,6 +24,7 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
 
        @Override
        public void start() {
+
                //化合物のレシピ
                this.mod.api.addChemicalCombinationRecipe(
                                new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")),
@@ -40,10 +41,10 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar),
                                new Formula("C12H22O11"));
 
-               this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater),
+               this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.bucketWater),
                                new Formula("H2O"));
 
-               this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
+               this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.potion, 1, 0),
                                new Formula("H2O"));
 
                this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
@@ -52,6 +53,24 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal),
                                new Formula("C"));
 
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
+                               new Formula("Fe"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotIron),
+                               new Formula("Fe"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.blockSteel),
+                               new Formula("9Fe"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
+                               new Formula("Au"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotGold),
+                               new Formula("Au"));
+
+               this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockGold),
+                               new Formula("9Au"));
+
                this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood),
                                new Formula("C6H10O5"));
 
@@ -129,17 +148,23 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
 
                //鉱石分解の追加
                Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
-               while (arrayOreNames.hasNext()) {
+               for (int i = 0; arrayOreNames.hasNext(); i++) {
                        String name = arrayOreNames.next();
-                       ItemStack itemstack;
+                       ItemStack ingot;
+                       ItemStack ore;
                        try {
-                                       itemstack = OreDictionary.getOres(name).get(0);
+                               ingot = OreDictionary.getOres("ingot" + name).get(0);
+                               ore = OreDictionary.getOres("ore" + name).get(0);
                        } catch (IndexOutOfBoundsException e) {
                                int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
-                               itemstack = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
+                               ingot = new ItemStack(this.mod.itemAtomIngots, 1, i);
+                               ore = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
                        }
                        this.mod.api.addPyrolysisDecompositionRecipe(
-                                       itemstack,
+                                       ingot,
+                                       this.mod.apiBase.getAtomOresFormulas().get(name));
+                       this.mod.api.addPyrolysisDecompositionRecipe(
+                                       ore,
                                        this.mod.apiBase.getAtomOresFormulas().get(name));
                }
        }