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:
parent
18609f57ac
commit
3c5e082541
|
@ -76,13 +76,13 @@ public interface IForgeRegistryEntry<V>
|
||||||
throw new IllegalStateException("Attempted to set registry name with existing registry name! New: " + name + " Old: " + getRegistryName());
|
throw new IllegalStateException("Attempted to set registry name with existing registry name! New: " + name + " Old: " + getRegistryName());
|
||||||
|
|
||||||
int index = name.lastIndexOf(':');
|
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);
|
name = index == -1 ? name : name.substring(index + 1);
|
||||||
ModContainer mc = Loader.instance().activeModContainer();
|
ModContainer mc = Loader.instance().activeModContainer();
|
||||||
String prefix = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? "minecraft" : mc.getModId().toLowerCase();
|
String prefix = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? "minecraft" : mc.getModId().toLowerCase();
|
||||||
if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
|
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;
|
prefix = oldPrefix;
|
||||||
}
|
}
|
||||||
this.registryName = new ResourceLocation(prefix, name);
|
this.registryName = new ResourceLocation(prefix, name);
|
||||||
|
|
Loading…
Reference in New Issue