Downgrade RegistryEntry's dangerous alternative prefix message to info instead of BigWarning.

This is still most likely a broken mod, but nobody ever actually fixes themselves, and i'm tired of being blamed for 'spamming' the logs.
This commit is contained in:
LexManos 2017-12-21 01:36:23 -08:00
parent 18609f57ac
commit 3c5e082541
1 changed files with 2 additions and 2 deletions

View File

@ -76,13 +76,13 @@ public interface IForgeRegistryEntry<V>
throw new IllegalStateException("Attempted to set registry name with existing registry name! New: " + name + " Old: " + getRegistryName());
int index = name.lastIndexOf(':');
String oldPrefix = index == -1 ? "" : name.substring(0, index);
String oldPrefix = index == -1 ? "" : name.substring(0, index).toLowerCase();
name = index == -1 ? name : name.substring(index + 1);
ModContainer mc = Loader.instance().activeModContainer();
String prefix = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? "minecraft" : mc.getModId().toLowerCase();
if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
{
FMLLog.bigWarning("Dangerous alternative prefix `{}` for name `{}`, expected `{}` invalid registry invocation/invalid name?", oldPrefix, name, prefix);
FMLLog.log.info("Potentially Dangerous alternative prefix `{}` for name `{}`, expected `{}`. This could be a intended override, but in most cases indicates a broken mod.", oldPrefix, name, prefix);
prefix = oldPrefix;
}
this.registryName = new ResourceLocation(prefix, name);