OSDN Git Service

29a7be6814eb75a9b1bf384da18943d3466e73be
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ore / ItemAtomOres.java
1 package pcc.chemicraft.base.ore;
2
3 import net.minecraft.item.ItemBlock;
4 import net.minecraft.item.ItemDye;
5 import net.minecraft.item.ItemStack;
6 import pcc.chemicraft.base.ChemiCraftBase;
7 import cpw.mods.fml.relauncher.Side;
8 import cpw.mods.fml.relauncher.SideOnly;
9
10 public class ItemAtomOres extends ItemBlock
11 {
12
13         public ItemAtomOres(int par1)
14         {
15                 super(par1);
16                 this.setMaxDamage(0);
17                 this.setHasSubtypes(true);
18         }
19
20         @Override
21         @SideOnly(Side.CLIENT)
22         public int getIconFromDamage(int par1)
23         {
24                 return ChemiCraftBase.instance.blockAtomOres[0].getBlockTextureFromSideAndMetadata(2, BlockAtomOres.getBlockFromDye(par1));
25         }
26
27         @Override
28         public int getMetadata(int par1)
29         {
30                 return par1;
31         }
32
33         @Override
34         public String getItemNameIS(ItemStack par1ItemStack)
35         {
36                 return super.getItemName() + "." + ItemDye.dyeColorNames[BlockAtomOres.getBlockFromDye(par1ItemStack.getItemDamage())];
37         }
38 }