BiomesOPlenty/common/biomesoplenty/items/ItemBOPWillow.java

40 lines
882 B
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemColored;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import biomesoplenty.api.Blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemBOPWillow extends ItemColored
{
2013-05-31 10:34:02 +00:00
@SideOnly(Side.CLIENT)
private Icon texture;
public ItemBOPWillow(int par1)
{
super(par1, false);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
texture = iconRegister.registerIcon("biomesoplenty:willow");
2013-05-31 10:34:02 +00:00
}
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack itemStack, int par2)
{
return Blocks.willow.get().getRenderColor(itemStack.getItemDamage());
}
@Override
public Icon getIconFromDamage(int meta)
{
return texture;
}
2013-05-03 13:00:44 +00:00
}