Merge pull request #115 from mezz/105

Better localization for wood blocks
This commit is contained in:
SirSengir committed 2014-08-17 11:30:28 +02:00
commit 1020227e7d
3 files changed
+124 -32

No files matched your search

@@ -70,7 +70,6 @@ public class ItemStairs extends ItemForestryBlock {
public String getItemStackDisplayName(ItemStack itemstack) {
WoodType type = WoodType.getFromCompound(itemstack.getTagCompound());
return getWoodNameIS(type) + " " + StringUtil.localize(getUnlocalizedName());
return StringUtil.localize(getUnlocalizedName() + "." + type.ordinal());
}
}
@@ -37,7 +37,9 @@ public class ItemWoodBlock extends ItemForestryBlock {
if (this.getBlock() instanceof IWoodTyped) {
IWoodTyped block = (IWoodTyped) getBlock();
return getWoodNameIS(block.getWoodType(itemstack.getItemDamage())) + " " + StringUtil.localize("tile." + block.getBlockKind());
int meta = itemstack.getItemDamage();
WoodType woodType = block.getWoodType(meta);
return StringUtil.localize("tile." + block.getBlockKind() + "." + woodType.ordinal());
} else
return StringUtil.localize(getUnlocalizedName(itemstack));
}