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         public Auxiliary(){\r
11         }\r
12 \r
13         class NameAuxiliary{\r
14 \r
15                 /**\r
16                  * \96¼\91O\82ð\92Ç\89Á\82·\82é\81B\r
17                  * @param object\r
18                  * @param Name\r
19                  */\r
20                 public void addName(Object object,Object name){\r
21                         LanguageRegistry.addName(object, (String) name);\r
22                 }\r
23 \r
24                 /**\r
25                  * \96¼\91O\82ð\92Ç\89Á\82·\82é(ItemStack\94Å)\r
26                  * @param object\r
27                  * @param name\r
28                  * @param meta\r
29                  */\r
30                 public void addName(ItemStack itemstack,Object name){\r
31                         LanguageRegistry.addName(itemstack, (String) name);\r
32                 }\r
33 \r
34 \r
35                 /**\r
36                  * \8ew\92è\82µ\82½\8c¾\8cê\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é\81B\r
37                  * @param object\r
38                  * @param name\r
39                  */\r
40                 public void addName(Object object,String lang,Object name){\r
41                         LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
42                 }\r
43 \r
44                 /**\r
45                  * \8ew\92è\82µ\82½\8c¾\8cê\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(ItemStack\94Å)\r
46                  * @param object\r
47                  * @param name\r
48                  */\r
49 \r
50                 public void addName(ItemStack object,String lang,Object name){\r
51                         LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
52                 }\r
53 \r
54                 /**\r
55                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Block\94Å)\r
56                  * @param object\r
57                  * @param name\r
58                  */\r
59                 public void addName(Block object,Object[] name){\r
60                         for(int i=0;i<name.length;i++){\r
61                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
62                         }\r
63                 }\r
64 \r
65                 /**\r
66                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Item\94Å)\r
67                  * @param object\r
68                  * @param name\r
69                  */\r
70                 public void addName(Item object,Object[] name){\r
71                         for(int i=0;i<name.length;i++){\r
72                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
73                         }\r
74                 }\r
75 \r
76                 /**\r
77                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\8ew\92è\82µ\82½\8c¾\8cê\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Block\94Å)\r
78                  * @param object\r
79                  * @param name\r
80                  */\r
81                 public void addName(Block object,String lang,Object[] name){\r
82                         for(int i=0;i<name.length;i++){\r
83                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
84                         }\r
85                 }\r
86 \r
87                 /**\r
88                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\8ew\92è\82µ\82½\8c¾\8cê\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Item\94Å)\r
89                  * @param object\r
90                  * @param name\r
91                  */\r
92                 public void addName(Item object,String lang, Object[] name){\r
93                         for(int i=0;i<name.length;i++){\r
94                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
95                         }\r
96                 }\r
97 \r
98         }\r
99 \r
100 }\r