package micdoodle8.mods.galacticraft.planets.venus.items;
import micdoodle8.mods.galacticraft.core.items.ItemBlockDesc;
import micdoodle8.mods.galacticraft.core.proxy.ClientProxyCore;
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
import micdoodle8.mods.galacticraft.planets.venus.blocks.BlockTorchWeb;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class ItemBlockTorchWeb extends ItemBlockDesc
{
public ItemBlockTorchWeb(Block block)
{
super(block);
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@Override
@SideOnly(Side.CLIENT)
public EnumRarity getRarity(ItemStack par1ItemStack)
{
return ClientProxyCore.galacticraftItem;
}
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
String name = BlockTorchWeb.EnumWebType.values()[itemstack.getItemDamage()].getName();
return this.getBlock().getUnlocalizedName() + "." + name;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
{
if (stack.getItemDamage() == 1)
{
tooltip.add(GCCoreUtil.translate("tile.web_torch.web_torch_1.description"));
}
}
@Override
public String getUnlocalizedName()
{
return this.getBlock().getUnlocalizedName() + ".0";
}
}