mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Only prompt for missing registries on local worlds (#5348)
This commit is contained in:
1 parent
f3d364397d
commit
8670abca57
1 file changed
+14
-11
@@ -568,20 +568,23 @@ public class GameData
|
||||
RegistryManager.ACTIVE.registries.forEach((name, reg) -> reg.dump(name));
|
||||
RegistryManager.ACTIVE.registries.forEach((name, reg) -> reg.resetDelegates());
|
||||
|
||||
List<ResourceLocation> missingRegs = snapshot.keySet().stream().filter(name -> !RegistryManager.ACTIVE.registries.containsKey(name)).collect(Collectors.toList());
|
||||
if (missingRegs.size() > 0)
|
||||
if (isLocalWorld)
|
||||
{
|
||||
String text = "Forge Mod Loader detected missing/unknown registrie(s).\n\n" +
|
||||
"There are " + missingRegs.size() + " missing registries in this save.\n" +
|
||||
"If you continue the missing registries will get removed.\n" +
|
||||
"This may cause issues, it is advised that you create a world backup before continuing.\n\n" +
|
||||
"Missing Registries:\n";
|
||||
List<ResourceLocation> missingRegs = snapshot.keySet().stream().filter(name -> !RegistryManager.ACTIVE.registries.containsKey(name)).collect(Collectors.toList());
|
||||
if (missingRegs.size() > 0)
|
||||
{
|
||||
String text = "Forge Mod Loader detected missing/unknown registrie(s).\n\n" +
|
||||
"There are " + missingRegs.size() + " missing registries in this save.\n" +
|
||||
"If you continue the missing registries will get removed.\n" +
|
||||
"This may cause issues, it is advised that you create a world backup before continuing.\n\n" +
|
||||
"Missing Registries:\n";
|
||||
|
||||
for (ResourceLocation s : missingRegs)
|
||||
text += s.toString() + "\n";
|
||||
for (ResourceLocation s : missingRegs)
|
||||
text += s.toString() + "\n";
|
||||
|
||||
if (!StartupQuery.confirm(text))
|
||||
StartupQuery.abort();
|
||||
if (!StartupQuery.confirm(text))
|
||||
StartupQuery.abort();
|
||||
}
|
||||
}
|
||||
|
||||
RegistryManager STAGING = new RegistryManager("STAGING");
|
||||
|
||||
Reference in new issue
Block a user