OSDN Git Service

end
[chemicraft/chemicraft.git] / ChemiCraftAPI.java
1 package net.minecraft.src.ChemiCraft;
2
3 import java.util.ArrayList;
4
5 public class ChemiCraftAPI {
6
7         public static ChemiCraftAPI instance = new ChemiCraftAPI();
8
9         private boolean addLanguage = false;
10         private static ArrayList<String> compoundsNameList = new ArrayList();
11         private static ArrayList<String> compoundsLangNameList = new ArrayList();
12         private static ArrayList<String> compoundsLangList = new ArrayList();
13         private static ArrayList<ICompoundHandler> compoundHandlers = new ArrayList<ICompoundHandler>();
14         private static ArrayList<String> compoundHandlerItemNames = new ArrayList<String>();
15
16         public static void addCompound(String name){
17                 compoundsNameList.add(name);
18                 compoundsLangNameList.add("");
19                 compoundsLangList.add("");
20         }
21
22         public static void addLangCompound(String lang, String englishName, String langName){
23                 compoundsNameList.add(englishName);
24                 compoundsLangNameList.add(langName);
25                 compoundsLangList.add(lang);
26         }
27
28         public static ArrayList<String> getCompoundsName(){
29                 compoundsNameList.trimToSize();
30                 return compoundsNameList;
31         }
32
33         public static ArrayList<String> getCompoundsLangName(){
34                 compoundsLangNameList.trimToSize();
35                 return compoundsLangNameList;
36         }
37
38         public static ArrayList<String> getCompoundsLang(){
39                 compoundsLangList.trimToSize();
40                 return compoundsLangList;
41         }
42
43         public static void addCompoundHandler(String handlerItemName, ICompoundHandler compoundHandler){
44                 ChemiCraftAPI.compoundHandlers.add(compoundHandler);
45                 compoundHandlerItemNames.add(handlerItemName);
46         }
47
48         public static ArrayList<ICompoundHandler> getCompoundHandler(){
49                 compoundHandlers.trimToSize();
50                 return compoundHandlers;
51
52         }
53
54         public static ArrayList<String> getCompoundHandlerItemName(){
55                 compoundHandlerItemNames.trimToSize();
56                 return compoundHandlerItemNames;
57         }
58
59 }