OSDN Git Service

(・∀・)
[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 net.minecraft.util.Icon;
7 import pcc.chemicraft.base.ChemiCraftBase;
8 import cpw.mods.fml.relauncher.Side;
9 import cpw.mods.fml.relauncher.SideOnly;
10
11 /**
12  * 鉱石のアイテム版です
13  * @author mozipi
14  */
15 public class ItemAtomOres extends ItemBlock {
16
17         public ItemAtomOres(int par1) {
18                 super(par1);
19                 this.setMaxDamage(0);
20                 this.setHasSubtypes(true);
21         }
22
23         /* 一時保留。詳しい仕様が決まらないと変更が難しいため。 --WIP--
24         @Override
25         @SideOnly(Side.CLIENT)
26         public Icon getIconFromDamage(int par1) {
27                 return ChemiCraftBase.instance.blockAtomOres[0].getBlockTextureFromSideAndMetadata(2, BlockAtomOres.getBlockFromDye(par1));
28         }
29         */
30
31         @Override
32         public int getMetadata(int par1) {
33                 return par1;
34         }
35
36         @Override
37         public String getUnlocalizedName(ItemStack par1ItemStack) {
38                 return super.getUnlocalizedName() + "." + ItemDye.dyeColorNames[BlockAtomOres.getBlockFromDye(par1ItemStack.getItemDamage())];
39         }
40 }