Try and see if there is anything to the identityHashCode collision hypothesis. If you see this in your error messages, kindly let us know!

This commit is contained in:
Christian 2014-05-10 14:53:08 -04:00
parent 0a9099c8dd
commit a66e8462d8

View file

@ -356,7 +356,9 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespaced {
} }
if (getId(thing) >= 0) // duplicate object if (getId(thing) >= 0) // duplicate object
{ {
throw new IllegalArgumentException(String.format("The object %s has been registered twice, using the names %s and %s.", thing, getNameForObject(thing), name)); int foundId = getId(thing);
Object otherThing = getRaw(foundId);
throw new IllegalArgumentException(String.format("The object %s{%x} has been registered twice, using the names %s and %s. (Other object at this id is %s{%x})", thing, System.identityHashCode(thing), getNameForObject(thing), name, otherThing, System.identityHashCode(otherThing)));
} }
if (GameData.isFrozen(this)) if (GameData.isFrozen(this))
{ {