/** * This class was created by . It's distributed as * part of the Botania Mod. Get the Source Code in github: * https://github.com/Vazkii/Botania * * Botania is Open Source and distributed under a * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) * * File Created @ [Jan 16, 2014, 5:54:06 PM (GMT)] */ package vazkii.botania.common.item.block; import net.minecraft.block.Block; import net.minecraft.item.ItemBlockWithMetadata; import net.minecraft.item.ItemStack; import vazkii.botania.client.lib.LibResources; public class ItemBlockWithMetadataAndName extends ItemBlockWithMetadata { public ItemBlockWithMetadataAndName(Block par2Block) { super(par2Block, par2Block); } @Override public String getUnlocalizedNameInefficiently(ItemStack par1ItemStack) { return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("tile.", "tile." + LibResources.PREFIX_MOD); } @Override public String getUnlocalizedName(ItemStack par1ItemStack) { return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage(); } }