From 0f456b4684a4bafd06f9d615ae8eb5040e56d469 Mon Sep 17 00:00:00 2001 From: cpw Date: Thu, 9 Jul 2015 17:05:20 -0400 Subject: [PATCH] Be a little bit more helpful when the ObjectHolder misses. Should help figure out what is going in in #2006 --- .../main/java/cpw/mods/fml/common/registry/ObjectHolderRef.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/ObjectHolderRef.java b/fml/src/main/java/cpw/mods/fml/common/registry/ObjectHolderRef.java index a6e838303..f69e6d2a2 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/ObjectHolderRef.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/ObjectHolderRef.java @@ -61,7 +61,7 @@ class ObjectHolderRef { if (this.injectedObject == null || !isValid()) { - throw new IllegalStateException("The ObjectHolder annotation cannot apply to a field that is not an Item or Block"); + throw new IllegalStateException(String.format("The ObjectHolder annotation cannot apply to a field that is not an Item or Block (found : %s at %s.%s)", field.getType().getName(), field.getClass().getName(), field.getName())); } makeWritable(field); }