2013-05-12 12:38:39 +00:00
|
|
|
package biomesoplenty.items;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemBlock;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
public class ItemBOPSkystone extends ItemBlock
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
private static final String[] types = new String[] {"holystone", "holycobble", "holybrick"};
|
2013-05-12 12:38:39 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
public ItemBOPSkystone(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
setMaxDamage(0);
|
|
|
|
setHasSubtypes(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getMetadata(int meta)
|
|
|
|
{
|
|
|
|
return meta & 15;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getUnlocalizedName(ItemStack itemstack) {
|
|
|
|
int meta = itemstack.getItemDamage();
|
|
|
|
if (meta < 0 || meta >= types.length) {
|
|
|
|
meta = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return types[meta];
|
|
|
|
}
|
2013-05-12 12:38:39 +00:00
|
|
|
}
|