use of forestry.arboriculture.IWoodFireproof in project ForestryMC by ForestryMC.
the class ItemWoodBlock method getItemStackDisplayName.
@Override
public String getItemStackDisplayName(ItemStack itemstack) {
if (this.getBlock() instanceof IWoodTyped) {
IWoodTyped block = (IWoodTyped) getBlock();
int meta = itemstack.getItemDamage();
WoodType woodType = block.getWoodType(meta);
if (woodType == null) {
return null;
}
String displayName;
String customUnlocalizedName = block.getBlockKind() + "." + woodType.ordinal() + ".name";
if (StringUtil.canTranslateTile(customUnlocalizedName)) {
displayName = StringUtil.localizeTile(customUnlocalizedName);
} else {
String woodGrammar = StringUtil.localize(block.getBlockKind() + ".grammar");
String woodTypeName = StringUtil.localize("trees.woodType." + woodType);
displayName = woodGrammar.replaceAll("%TYPE", woodTypeName);
}
if (this.getBlock() instanceof IWoodFireproof) {
displayName = StringUtil.localizeAndFormatRaw("tile.for.fireproof", displayName);
}
return displayName;
}
return super.getItemStackDisplayName(itemstack);
}
Aggregations