From 8121f3fcae44a18073bb062a6541007f4766e2cf Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 20 Jan 2014 07:49:44 -0500 Subject: [PATCH] findBlock should now return null, not the default block, if the thing being looked for is not found. Closes #352 --- fml/src/main/java/cpw/mods/fml/common/registry/GameData.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java b/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java index eb2be1412..f389f6d84 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java @@ -63,7 +63,8 @@ public class GameData { static Block findBlock(String modId, String name) { - return (Block) blockRegistry.func_82594_a(modId + ":" + name); + String key = modId + ":" + name; + return blockRegistry.contains(key) ? blockRegistry.func_82594_a(key) : null; } static ItemStack findItemStack(String modId, String name)