mojira.dev
MC-254633

Clicking on "Create World" in singleplayer menu freezes/lags game temporarily

I just tried to create a new world in 1.19.1-rc3 to test and confirm another bug, and when I clicked on the "Create World" button, the game froze for a few seconds saying "Preparing for world creation" (Screenshot below).

Because I could not remember the game doing that before, I tested it again on 1.18.2 and on 1.19.
On 1.18.2, this does not happen, the menu with the world generation settings is immediately there without any lag/freeze.
But on 1.19, the before mentioned freeze/lag happens for a few seconds, and then it displays the world generation menu.

Attachments

Comments 4

Sometimes it just takes a while

I think that's intentional and why they added the loading screen.

@cmhcoder
It has never taken any time to open that menu on any version ever before 1.19.
I have tested this multiple times...on 1.18.2 it never took even a single second to open that menu, even after a complete restart, while it always takes a while on 1.19+, even after having opened and closed that menu literally a second before

@TheMinerBoy56
I don't think it is...why should it suddenly have a loading time 10x longer than any other version before without much changes to world generation?
Like, even 1.18 didn't introduce a loading time to that menu, although that version literally revamped the entire overworld generation...

Can you find a specific cause of this being a bug, rather than intentional design? The game does not 'freeze' (as in stop responding) but instead opens an intermediate screen before loading the world creation (which specifically calls out how the game is preparing the next screen).

Looking in 'CreateWorldScreen', this seems to specifically be an intentional descision, as the game renders the screen, before loading vanilla resources, creating a server config, and loading the generator options. After that is all done, the game then sets the proper screen.

public static void create(MinecraftClient client, @Nullable Screen parent) {
		showMessage(client, PREPARING_TEXT);
		ResourcePackManager resourcePackManager = new ResourcePackManager(new VanillaDataPackProvider(client.getSymlinkFinder()));
		SaveLoading.ServerConfig serverConfig = createServerConfig(resourcePackManager, DataConfiguration.SAFE_MODE);
		CompletableFuture<GeneratorOptionsHolder> completableFuture = SaveLoading.load(
			serverConfig,
			context -> new SaveLoading.LoadContext(
					new CreateWorldScreen.WorldCreationSettings(
						new WorldGenSettings(GeneratorOptions.createRandom(), WorldPresets.createDemoOptions(context.worldGenRegistryManager())), context.dataConfiguration()
					),
					context.dimensionsRegistryManager()
				),
			(resourceManager, dataPackContents, combinedDynamicRegistries, generatorOptions) -> {
				resourceManager.close();
				return new GeneratorOptionsHolder(generatorOptions.worldGenSettings(), combinedDynamicRegistries, dataPackContents, generatorOptions.dataConfiguration());
			},
			Util.getMainWorkerExecutor(),
			client
		);
		client.runTasks(completableFuture::isDone);
		client.setScreen(
			new CreateWorldScreen(client, parent, (GeneratorOptionsHolder)completableFuture.join(), Optional.of(WorldPresets.DEFAULT), OptionalLong.empty())
		);
	}

Chris6ix

(Unassigned)

Unconfirmed

(Unassigned)

1.19, 1.19.1 Release Candidate 3

Retrieved