OSDN Git Service

修正・変更
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ChemiCraftAPI.java
index 821bb97..bdddd39 100644 (file)
@@ -7,6 +7,7 @@ import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 import pcc.chemicraft.gen.WorldGenAtomsOre;
 import pcc.chemicraft.system.ChemiCraftCraftingManager;
+import pcc.chemicraft.tileentity.TileEntityElectrolysisTable;
 import pcc.chemicraft.tileentity.TileEntityPyrolysisTable;
 import pcc.chemicraft.util.ChemicalNBTRecipe;
 import pcc.chemicraft.util.ICompoundHandler;
@@ -65,6 +66,12 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 電池
+        */
+       private HashMap<ItemStack, Integer> chemicalCellsList = new HashMap<ItemStack, Integer>();
+
+
+       /**
         * 電池言語リスト
         */
        private ListHash<String, String> chemicalCellsLangListHash = new ListHash<String, String>();
@@ -76,9 +83,6 @@ public class ChemiCraftAPI {
        private ListHash<String, String> chemicalCellsNameListHash = new ListHash<String, String>();
 
 
-       private HashMap<ItemStack, Integer> chemicalCellsFuelList = new HashMap<ItemStack, Integer>();
-
-
 
        /**
         * 化合台の原子の数のリスト
@@ -181,7 +185,7 @@ public class ChemiCraftAPI {
 
 
        public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){
-               addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par7PosY, par7PosY, par7PosY, par7PosY);
+               addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par4Id, par5Size, par6Frequency, par7PosY);
        }
 
 
@@ -204,7 +208,7 @@ public class ChemiCraftAPI {
         * @param par1Name
         */
        public void addChemicalCell(Item par1ChemicalCell, String par2Name, int par3OperationTime){
-               chemicalCellsFuelList.put(new ItemStack(par1ChemicalCell, 0, chemicalCellsNameListHash.sizeKeysList()), par3OperationTime);
+               chemicalCellsList.put(new ItemStack(par1ChemicalCell, 0, chemicalCellsNameListHash.sizeKeysList()), par3OperationTime);
                addChemicalCellLanguage(par2Name, "en_US", par2Name);
        }
 
@@ -272,7 +276,7 @@ public class ChemiCraftAPI {
         * @param itemstack 燃料のItemStack
         * @param burnTime 燃焼時間(tick * rate)
         */
-       public void addDecompositionFuel(ItemStack itemstack, int burnTime) {
+       public void addPyrolysisDecompositionFuel(ItemStack itemstack, int burnTime) {
                TileEntityPyrolysisTable.addFuel(itemstack, burnTime);
        }
 
@@ -283,7 +287,7 @@ public class ChemiCraftAPI {
         * @param integers 原子の元素番号の配列
         * @param integers2 原子のできる数の配列
         */
-       public void addDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) {
+       public void addPyrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) {
                ItemStack[] itemstacks = new ItemStack[integers.length];
                for (int i = 0; i < itemstacks.length; i++) {
                        itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]);
@@ -293,6 +297,16 @@ public class ChemiCraftAPI {
 
 
 
+       public void addElectrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) {
+               ItemStack[] itemstacks = new ItemStack[integers.length];
+               for (int i = 0; i < itemstacks.length; i++) {
+                       itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]);
+               }
+               TileEntityElectrolysisTable.addRecipe(material, itemstacks);
+       }
+
+
+
        /**
         * 素材作成台のレシピを追加します
         * @param materials 素材
@@ -384,8 +398,8 @@ public class ChemiCraftAPI {
 
 
 
-       public HashMap<ItemStack, Integer> getChemicalCellsFuelList(){
-               return chemicalCellsFuelList;
+       public HashMap<ItemStack, Integer> getChemicalCellsList(){
+               return chemicalCellsList;
        }