Fix exception when requesting ItemWoodBlock's unlocalized name when using the oredict metadata.

closes #171
This commit is contained in:
mezz committed 2014-09-07 15:14:11 -07:00
1 parent 2f104c4149
commit 32c3f923e0
1 file changed
+2
@@ -34,6 +34,8 @@ public class ItemWoodBlock extends ItemForestryBlock {
IWoodTyped block = (IWoodTyped) getBlock();
int meta = itemstack.getItemDamage();
WoodType woodType = block.getWoodType(meta);
if (woodType == null)
return null;
return "tile.for." + block.getBlockKind() + "." + woodType.ordinal();
}
return super.getUnlocalizedName(itemstack);