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:
parent
7f8b30aed3
commit
f4a85e5f03
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue