mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix exception when requesting ItemWoodBlock's unlocalized name when using the oredict metadata.
closes #171
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user