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 pcc.chemicraft.base.ChemiCraftBase;
7 import cpw.mods.fml.relauncher.Side;
8 import cpw.mods.fml.relauncher.SideOnly;
9
10 /**
11  * 鉱石のアイテム版です
12  * @author mozipi
13  */
14 public class ItemAtomOres extends ItemBlock {
15
16         public ItemAtomOres(int par1) {
17                 super(par1);
18                 this.setMaxDamage(0);
19                 this.setHasSubtypes(true);
20         }
21
22         @Override
23         @SideOnly(Side.CLIENT)
24         public int getIconFromDamage(int par1) {
25                 return ChemiCraftBase.instance.blockAtomOres[0].getBlockTextureFromSideAndMetadata(2, BlockAtomOres.getBlockFromDye(par1));
26         }
27
28         @Override
29         public int getMetadata(int par1) {
30                 return par1;
31         }
32
33         @Override
34         public String getItemNameIS(ItemStack par1ItemStack) {
35                 return super.getItemName() + "." + ItemDye.dyeColorNames[BlockAtomOres.getBlockFromDye(par1ItemStack.getItemDamage())];
36         }
37 }