OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/chemicraft/chemicraft
[chemicraft/chemicraft.git] / src / ChemiCraftAPI.java
index 5d5be58..f624aa7 100644 (file)
@@ -10,13 +10,18 @@ public class ChemiCraftAPI {
        private static ArrayList<String> compoundsNameList = new ArrayList();
        private static ArrayList<String> compoundsLangNameList = new ArrayList();
        private static ArrayList<String> compoundsLangList = new ArrayList();
+       private static ArrayList<ICompoundHandler> compoundHandlers = new ArrayList<ICompoundHandler>();
+       private static ArrayList<String> compoundHandlerItemNames = new ArrayList<String>();
 
        public static void addCompound(String name){
                compoundsNameList.add(name);
+               compoundsLangNameList.add("");
+               compoundsLangList.add("");
        }
 
-       public static void addLangCompound(String lang, String name){
-               compoundsLangNameList.add(name);
+       public static void addLangCompound(String lang, String englishName, String langName){
+               compoundsNameList.add(englishName);
+               compoundsLangNameList.add(langName);
                compoundsLangList.add(lang);
        }
 
@@ -35,4 +40,20 @@ public class ChemiCraftAPI {
                return compoundsLangList;
        }
 
+       public static void addCompoundHandler(String handlerItemName, ICompoundHandler compoundHandler){
+               ChemiCraftAPI.compoundHandlers.add(compoundHandler);
+               compoundHandlerItemNames.add(handlerItemName);
+       }
+
+       public static ArrayList<ICompoundHandler> getCompoundHandler(){
+               compoundHandlers.trimToSize();
+               return compoundHandlers;
+
+       }
+
+       public static ArrayList<String> getCompoundHandlerItemName(){
+               compoundHandlerItemNames.trimToSize();
+               return compoundHandlerItemNames;
+       }
+
 }