Clean up broken aliases caused by registry bug #4894. (#4909)

This commit is contained in:
cpw authored and mezz committed 2018-04-30 21:05:37 -07:00
1 parent f2fa21e6e2
commit 9e9cb021ab
1 file changed
+10 -1
@@ -856,7 +856,16 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
}
else
{
ret.aliases.put(new ResourceLocation(comp.getString("K")), new ResourceLocation(v));
ResourceLocation aliask = new ResourceLocation(comp.getString("K"));
ResourceLocation aliasv = new ResourceLocation(v);
if (aliasv.equals(aliask))
{
FMLLog.log.warn("Found unrecoverable 4894 bugged alias/override: {} -> {}, skipping.", aliask, aliasv);
}
else
{
ret.aliases.put(aliask, aliasv);
}
}
});