OSDN Git Service

ソース参照
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ChemiCraftRegisterBaseRecipe.java
index a59a51d..be67f7a 100644 (file)
@@ -6,6 +6,8 @@ import net.minecraft.block.Block;
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 import net.minecraftforge.oredict.OreDictionary;
+import pcc.chemicraft.ChemiCraftData;
+import pcc.chemicraft.core.ChemiCraftAPI;
 import pcc.chemicraft.core.ChemiCraftCore;
 import pcc.chemicraft.core.nbt.NBTRecipeGrenade;
 import pcc.chemicraft.util.Formula;
@@ -22,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")),
@@ -33,22 +36,40 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
 
                //既存物のレシピ
                this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond),
-                               new Formula("C64Si16"));
+                               new Formula("C4096Si64"));
 
                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.addReversibleOfPyrolysis(new ItemStack(Item.coal),
+                               new Formula("C64"));
+
                this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
                                new Formula("C"));
 
-               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal),
-                               new Formula("C"));
+               this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotIron),
+                               new Formula("Fe"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
+                               new Formula("Fe"));
+
+               this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockSteel),
+                               new Formula("9Fe"));
+
+               this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.ingotGold),
+                               new Formula("Au"));
+
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
+                               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"));
@@ -68,25 +89,17 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald),
                                new Formula("Be3Al2Si6O18"));
 
+               this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreEmerald),
+                               new Formula("Be3Al2Si6O18"));
+
 
-               //他MOD使用時のレシピ
-               //RP2-------------------------------------------------------------------------------------------------------------
-               this.mod.api.addPyrolysisDecompositionRecipe(
-                               OreDictionary.getOres("oreCopper"), new Formula("Cu"));
-               //------------------------------------------------------------------------------------------------------------------
 
                //素材制作台のレシピ
                this.mod.api.addMaterialRecipe(
                                new ItemStack[] {
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               new ItemStack(Item.gunpowder),
-                                               new ItemStack(Block.stone),
-                                               null,
-                                               new ItemStack(Block.stone),
-                                               null
+                                               null, new ItemStack(Block.stone), null,
+                                               new ItemStack(Block.stone), new ItemStack(Item.gunpowder), new ItemStack(Block.stone),
+                                               null, new ItemStack(Block.stone), null
                                },
                                new ItemStack(this.mod.itemAtomGrenade, 16, 0),
                                new NBTRecipeGrenade());
@@ -99,6 +112,33 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                                new NBTRecipeGrenade()
                                );
 
+               ChemiCraftAPI.addMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
+                                               new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
+                                               new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
+                               },
+                               new ItemStack(this.mod.itemRadiationBallet),
+                               null);
+
+               ChemiCraftAPI.addMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(Block.stone), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Block.stone),
+                                               new ItemStack(Item.ingotIron), new ItemStack(Item.redstone), new ItemStack(Item.ingotIron),
+                                               new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
+                               },
+                               new ItemStack(this.mod.itemRaditionGunDataChip),
+                               null);
+
+               ChemiCraftAPI.addMaterialRecipe(
+                               new ItemStack[]{
+                                               new ItemStack(Block.blockSteel), new ItemStack(Block.blockSteel), new ItemStack(this.mod.itemRaditionGunDataChip),
+                                               null, null, new ItemStack(Block.stone),
+                                               null, null, new ItemStack(Item.stick)
+                               },
+                               new ItemStack(this.mod.itemRadiationGun),
+                               null);
+
                //分解台のレシピ
                this.mod.api.addElectrolysisDecompositionRecipe(
                                new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
@@ -106,17 +146,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));
                }
        }