OSDN Git Service

MathHelperPlusクラスのパッケージを変更。
[chemicraft/chemicraft.git] / common / chemicraft / item / ItemAtoms.java
1 package chemicraft.item;
2
3 import java.util.List;
4
5 import net.minecraft.src.CreativeTabs;
6 import net.minecraft.src.Item;
7 import net.minecraft.src.ItemStack;
8 import chemicraft.ChemiCraft;
9 import cpw.mods.fml.common.Side;
10 import cpw.mods.fml.common.asm.SideOnly;
11
12 public class ItemAtoms extends Item {
13
14         public ItemAtoms(int par1){
15                 super(par1);
16                 this.maxStackSize = 1;
17                 this.setHasSubtypes(true);
18                 this.setMaxDamage(0);
19                 this.setCreativeTab(ChemiCraft.instance.creativeTab);
20         }
21
22
23
24         @SideOnly(Side.CLIENT)
25         @Override
26         public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
27                 for(int type = 0; type < ChemiCraft.instance.atomsName.length; type++)
28                 {
29                         par3List.add(new ItemStack(par1, 1, type));
30                         this.setIconIndex(type);
31                 }
32         }
33
34
35
36         @Override
37         public String getItemNameIS(ItemStack par1ItemStack){
38                 return super.getItemName() + "." + ChemiCraft.instance.atomsName[par1ItemStack.getItemDamage()];
39         }
40
41
42
43         @Override
44         public String getTextureFile(){
45                 return ChemiCraft.instance.itemAtomsTexture;
46         }
47
48
49
50         @SideOnly(Side.CLIENT)
51         @Override
52         public int getIconFromDamage(int par1){
53                 return par1;
54         }
55
56 }