From 32c3f923e0ea25c49446457c3d6d4dc614537fc2 Mon Sep 17 00:00:00 2001 From: mezz Date: Sun, 7 Sep 2014 15:13:37 -0700 Subject: [PATCH] Fix exception when requesting ItemWoodBlock's unlocalized name when using the oredict metadata. closes #171 --- src/main/java/forestry/arboriculture/items/ItemWoodBlock.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/forestry/arboriculture/items/ItemWoodBlock.java b/src/main/java/forestry/arboriculture/items/ItemWoodBlock.java index d7b4edb70..62387fae2 100755 --- a/src/main/java/forestry/arboriculture/items/ItemWoodBlock.java +++ b/src/main/java/forestry/arboriculture/items/ItemWoodBlock.java @@ -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);