mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fixed an NPE caused by missing registries. (#6292)
Missing registries in this case being registries renamed without proper remapping or created by mods that were removed.
This commit is contained in:
1 parent
7f8b30aed3
commit
f4a85e5f03
1 file changed
+2
-1
@@ -87,12 +87,13 @@ public class RegistryManager
|
||||
|
||||
public <V extends IForgeRegistryEntry<V>> ResourceLocation updateLegacyName(ResourceLocation legacyName)
|
||||
{
|
||||
ResourceLocation originalName = legacyName;
|
||||
while (getRegistry(legacyName) == null)
|
||||
{
|
||||
legacyName = legacyNames.get(legacyName);
|
||||
if (legacyName == null)
|
||||
{
|
||||
return null;
|
||||
return originalName;
|
||||
}
|
||||
}
|
||||
return legacyName;
|
||||
|
||||
Reference in new issue
Block a user