OSDN Git Service

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