diff --git a/common/cpw/mods/fml/common/registry/EntityRegistry.java b/common/cpw/mods/fml/common/registry/EntityRegistry.java index df2c6bab4a..b1ed86b1db 100644 --- a/common/cpw/mods/fml/common/registry/EntityRegistry.java +++ b/common/cpw/mods/fml/common/registry/EntityRegistry.java @@ -179,8 +179,7 @@ public class EntityRegistry } else { - FMLLog.severe("There is a rogue mod trying to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped."); - Thread.dumpStack(); + FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped."); } FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass); return; @@ -222,6 +221,21 @@ public class EntityRegistry public static void registerGlobalEntityID(Class entityClass, String entityName, int id, int backgroundEggColour, int foregroundEggColour) { + if (EntityList.field_75626_c.containsKey(entityClass)) + { + ModContainer activeModContainer = Loader.instance().activeModContainer(); + String modId = "unknown"; + if (activeModContainer != null) + { + modId = activeModContainer.getModId(); + } + else + { + FMLLog.severe("There is a rogue mod failing to register entities from outside the context of mod loading. This is incredibly dangerous and should be stopped."); + } + FMLLog.warning("The mod %s tried to register the entity class %s which was already registered - if you wish to override default naming for FML mod entities, register it here first", modId, entityClass); + return; + } instance().validateAndClaimId(id); EntityList.func_75614_a(entityClass, entityName, id, backgroundEggColour, foregroundEggColour); }