OSDN Git Service

命名が間違っているクラスがあったので修正
[chemicraft/chemicraft.git] / common / chemicraft / Auxiliary.java
1 package chemicraft;\r
2 \r
3 import net.minecraft.src.Block;\r
4 import net.minecraft.src.Item;\r
5 import net.minecraft.src.ItemStack;\r
6 import cpw.mods.fml.common.registry.LanguageRegistry;\r
7 \r
8 public class Auxiliary {\r
9 \r
10         class NameAuxiliary {\r
11 \r
12                 /**\r
13                  * 名前を設定します\r
14                  * @param object\r
15                  * @param Name\r
16                  */\r
17                 public void addName(Object object,Object name){\r
18                         LanguageRegistry.addName(object, (String) name);\r
19                 }\r
20 \r
21 \r
22 \r
23                 /**\r
24                  * 名前を設定します(ItemStack版)\r
25                  * @param object\r
26                  * @param name\r
27                  * @param meta\r
28                  */\r
29                 public void addName(ItemStack itemstack,Object name){\r
30                         LanguageRegistry.addName(itemstack, (String) name);\r
31                 }\r
32 \r
33 \r
34 \r
35                 /**\r
36                  * 指定言語にそって名前を追加します\r
37                  * @param object\r
38                  * @param lang\r
39                  * @param name\r
40                  */\r
41                 public void addName(Object object,String lang,Object name){\r
42                         LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
43                 }\r
44 \r
45 \r
46 \r
47                 /**\r
48                  * 指定言語にそって名前を追加します(ItemStack版)\r
49                  * @param object\r
50                  * @param lang\r
51                  * @param name\r
52                  */\r
53                 public void addName(ItemStack object,String lang,Object name){\r
54                         LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
55                 }\r
56 \r
57 \r
58 \r
59                 /**\r
60                  * メタデータごとに名前を追加します(Block版)\r
61                  * @param object\r
62                  * @param name\r
63                  */\r
64                 public void addName(Block object,Object[] name){\r
65                         for(int i=0;i<name.length;i++){\r
66                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
67                         }\r
68                 }\r
69 \r
70 \r
71 \r
72                 /**\r
73                  * メタデータごとに名前を追加します(Item版)\r
74                  * @param object\r
75                  * @param name\r
76                  */\r
77                 public void addName(Item object,Object[] name){\r
78                         for(int i=0;i<name.length;i++){\r
79                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
80                         }\r
81                 }\r
82 \r
83 \r
84 \r
85                 /**\r
86                  * 指定された言語にそってメタデータごとに名前を設定します(Block版)\r
87                  * @param object\r
88                  * @param name\r
89                  */\r
90                 public void addName(Block object,String lang,Object[] name){\r
91                         for(int i=0;i<name.length;i++){\r
92                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
93                         }\r
94                 }\r
95 \r
96 \r
97 \r
98                 /**\r
99                  * 指定された言語にそってメタデータごとに名前を設定します(Item版)\r
100                  * @param object\r
101                  * @param name\r
102                  */\r
103                 public void addName(Item object,String lang, Object[] name){\r
104                         for(int i=0;i<name.length;i++){\r
105                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
106                         }\r
107                 }\r
108 \r
109         }\r
110 \r
111 }\r