OSDN Git Service

鉱石追加用クラス・API等を追加or更新
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ore / ItemAtomsOre.java
1 package pcc.chemicraft.ore;
2
3 import pcc.chemicraft.ChemiCraft;
4 import net.minecraft.block.Block;
5 import net.minecraft.item.ItemBlock;
6 import net.minecraft.item.ItemDye;
7 import net.minecraft.item.ItemStack;
8 import cpw.mods.fml.relauncher.Side;
9 import cpw.mods.fml.relauncher.SideOnly;
10
11 public class ItemAtomsOre extends ItemBlock
12 {
13
14         public ItemAtomsOre(int par1)
15         {
16                 super(par1);
17                 this.setMaxDamage(0);
18                 this.setHasSubtypes(true);
19         }
20
21         @Override
22         @SideOnly(Side.CLIENT)
23         public int getIconFromDamage(int par1)
24         {
25                 return ChemiCraft.instance.blockAtomsOre[0].getBlockTextureFromSideAndMetadata(2, BlockAtomsOre.getBlockFromDye(par1));
26         }
27
28         @Override
29         public int getMetadata(int par1)
30         {
31                 return par1;
32         }
33
34         @Override
35         public String getItemNameIS(ItemStack par1ItemStack)
36         {
37                 return super.getItemName() + "." + ItemDye.dyeColorNames[BlockAtomsOre.getBlockFromDye(par1ItemStack.getItemDamage())];
38         }
39 }