OSDN Git Service

ソース追加
[chemicraft/chemicraft.git] / src / Auxiliary.java
1 package net.minecraft.src.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                  * \82Æ\82è\82 \82¦\82¸\8dì\90¬\81B\82 \82é\82Ì\82Å\83{\83c\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                  * \82±\82¿\82ç\82à\82 \82é\82Ì\82Å\83{\83c\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                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Block\94Å)\r
36                  * @param object\r
37                  * @param name\r
38                  */\r
39                 public void addForName(Block object,Object[] name){\r
40                         for(int i=0;i<name.length;i++){\r
41                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
42                         }\r
43                 }\r
44 \r
45                 /**\r
46                  * \83\81\83^\83f\81[\83^+\94z\97ñ\82Å\96¼\91O\82ð\92Ç\89Á\82·\82é(Item\94Å)\r
47                  * @param object\r
48                  * @param name\r
49                  */\r
50                 public void addForName(Item object,Object[] name){\r
51                         for(int i=0;i<name.length;i++){\r
52                                 LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
53                         }\r
54                 }\r
55 \r
56                 /**\r
57                  * \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
58                  * @param object\r
59                  * @param name\r
60                  */\r
61                 public void addForLangName(Block object,String lang,Object[] name){\r
62                         for(int i=0;i<name.length;i++){\r
63                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
64                         }\r
65                 }\r
66 \r
67                 /**\r
68                  * \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
69                  * @param object\r
70                  * @param name\r
71                  */\r
72                 public void addForLangName(Item object,String lang, Object[] name){\r
73                         for(int i=0;i<name.length;i++){\r
74                                 LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
75                         }\r
76                 }\r
77 \r
78         }\r
79 \r
80 }\r