mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
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:
1 parent
d8b6adb259
commit
5275cea844
1 file changed
+3
-1
@@ -356,7 +356,9 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespaced {
|
||||
}
|
||||
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))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user