3 import java.util.ArrayList;
7 * 基本的にAddonはこのクラスのインスタンスを使う
11 public class ChemiCraftAPI {
14 * Instance of the ChemiCraftAPI.
16 public static ChemiCraftAPI instance = new ChemiCraftAPI();
20 * List of compounds names.
22 private static ArrayList<String> compoundsNameList = new ArrayList();
26 * List of compounds names(Some kind of language).
28 private static ArrayList<String> compoundsLangNameList = new ArrayList();
32 * List of compounds the language names.
34 private static ArrayList<String> compoundsLangList = new ArrayList();
38 * List of compounds handlers.
40 private static ArrayList<ICompoundHandler> compoundHandlers = new ArrayList<ICompoundHandler>();
43 * List of item name of handler to compounds.
45 private static ArrayList<String> compoundHandlerItemNames = new ArrayList<String>();
50 * @param name compound name.
52 public static void addCompound(String name){
53 compoundsNameList.add(name);
54 compoundsLangNameList.add("");
55 compoundsLangList.add("");
61 * add compound corresponding to the language.
62 * @param lang Language to the corresponding
63 * @param englishName compound name
64 * @param langName compound name(specified language)
66 public static void addLangCompound(String lang, String englishName, String langName){
67 compoundsNameList.add(englishName);
68 compoundsLangNameList.add(langName);
69 compoundsLangList.add(lang);
75 * setting compound handler.
76 * @param handlerItemName
77 * @param compoundHandler
79 public static void settingCompoundHandler(String handlerItemName, ICompoundHandler compoundHandler){
80 ChemiCraftAPI.compoundHandlers.add(compoundHandler);
81 compoundHandlerItemNames.add(handlerItemName);
86 //以下システム関連//////////////////////////////////////////////////////
88 public static ArrayList<ICompoundHandler> getCompoundHandler(){
89 compoundHandlers.trimToSize();
90 return compoundHandlers;
96 public static ArrayList<String> getCompoundHandlerItemName(){
97 compoundHandlerItemNames.trimToSize();
98 return compoundHandlerItemNames;
103 public static ArrayList<String> getCompoundsName(){
104 compoundsNameList.trimToSize();
105 return compoundsNameList;
110 public static ArrayList<String> getCompoundsLangName(){
111 compoundsLangNameList.trimToSize();
112 return compoundsLangNameList;
117 public static ArrayList<String> getCompoundsLang(){
118 compoundsLangList.trimToSize();
119 return compoundsLangList;