OSDN Git Service

I with OWATA
[chemicraft/chemicraft.git] / common / pcc / chemicraft / core / ChemiCraftAPI.java
index 49ebd56..22f8b7a 100644 (file)
@@ -35,18 +35,6 @@ public class ChemiCraftAPI {
 
 
        /**
-        * 電池
-        */
-       private HashMap<ItemStack, Integer> chemicalCellsList = new HashMap<ItemStack, Integer>();
-
-
-       /**
-        * 電池名リスト
-        */
-       private ListHash<String, String> chemicalCellsNameListHash = new ListHash<String, String>();
-
-
-       /**
         * 化合台の原子の数のリスト
         */
        private ArrayList<Integer[]> chemicalCombinationAmounts = new ArrayList<Integer[]>();
@@ -98,6 +86,12 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 電気分解燃料のリスト。
+        */
+       private HashMap<ItemStack, Integer> electrolysisFuelList = new HashMap<ItemStack, Integer>();
+
+
+       /**
         * 電気分解レシピのリスト
         */
        private HashMap<ItemStack, ItemStack[]> electrolysisRecipeList = new HashMap<ItemStack, ItemStack[]>();
@@ -140,34 +134,6 @@ public class ChemiCraftAPI {
        private ArrayList<Boolean> toolAndWeaponSharpless = new ArrayList<Boolean>();
 
 
-       /**
-        * 電池を追加します
-        * @param par1Name
-        */
-       public void addChemicalCell(Item par1ChemicalCell, String par2Name, int par3OperationTime){
-               chemicalCellsList.put(
-                               new ItemStack(
-                                               par1ChemicalCell,
-                                               1,
-                                               chemicalCellsNameListHash.sizeKeysList()),
-                                               par3OperationTime);
-               addChemicalCellLanguage(
-                               "en_US",
-                               par2Name);
-       }
-
-
-       /**
-        * 既に登録した電池の新しい名前・言語を追加します
-        * @param par1Name 英語名
-        * @param par2NewName 新しい名前
-        * @param par3Language 言語
-        */
-       public void addChemicalCellLanguage(String par1NewLanguage, String par2NewName){
-               chemicalCellsNameListHash.add(par1NewLanguage, par2NewName);
-       }
-
-
 
        /**
         * 化合レシピを追加します。materialの要素数は0<= n <= 16にしてください。
@@ -213,6 +179,19 @@ public class ChemiCraftAPI {
 
 
 
+       /**
+        * 電気分解台の燃料を追加します
+        * @param itemstack 燃料のItemStack
+        * @param burnTime 燃焼時間(tick * rate)
+        */
+       public void addElectrolysisDecompositionFuel(ItemStack itemstack, int burnTime) {
+               this.electrolysisFuelList.put(
+                               itemstack,
+                               burnTime);
+       }
+
+
+
        public void addElectrolysisDecompositionRecipe(ArrayList<ItemStack> material, Formula formula) {
                for (ItemStack item : material)
         {
@@ -259,6 +238,23 @@ public class ChemiCraftAPI {
 
 
        /**
+        * 素材作成台の不定形レシピを追加します
+        * @param materials 素材
+        * @param result 結果
+        * @param nbtRecipe NBT(Nullの場合はなし)
+        */
+       public void addSharplessMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){
+               materialRecipe.add(
+                               new MaterialRecipe(
+                                               result,
+                                               materials,
+                                               nbtRecipe,
+                                               true));
+       }
+
+
+
+       /**
         * 電気分解台の燃料を追加します
         * @param itemstack 燃料のItemStack
         * @param burnTime 燃焼時間(tick * rate)
@@ -328,23 +324,6 @@ public class ChemiCraftAPI {
 
 
        /**
-        * 素材作成台の不定形レシピを追加します
-        * @param materials 素材
-        * @param result 結果
-        * @param nbtRecipe NBT(Nullの場合はなし)
-        */
-       public void addSharplessMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){
-               materialRecipe.add(
-                               new MaterialRecipe(
-                                               result,
-                                               materials,
-                                               nbtRecipe,
-                                               true));
-       }
-
-
-
-       /**
         * ツール&武器作成台の不定形レシピを追加します
         * @param materials 素材
         * @param result 結果
@@ -370,16 +349,6 @@ public class ChemiCraftAPI {
 
 
 
-       public HashMap<ItemStack, Integer> getChemicalCellsList(){
-               return chemicalCellsList;
-       }
-
-
-       public ListHash<String, String> getChemicalCellsName(){
-               return chemicalCellsNameListHash;
-       }
-
-
        //以下システム関連//////////////////////////////////////////////////////
 
        public ArrayList<Integer[]> getChemicalCombinationAmounts(){
@@ -437,6 +406,13 @@ public class ChemiCraftAPI {
 
 
 
+       public HashMap<ItemStack, Integer> getElectrolysisFuelList()
+       {
+               return electrolysisFuelList;
+       }
+
+
+
        public HashMap<ItemStack, ItemStack[]> getElectrolysisRecipeList()
        {
                return electrolysisRecipeList;