Skip to content

WorldCreator - option to override setting initial spawn #12044

@ShaneBeee

Description

@ShaneBeee

Is your feature request related to a problem?

The main issue with creating a new world via WorldCreator, is it can take upwards of 10 seconds (or longer on some machines I'm assuming)
After throwing in like 20 debug timings, I came to the conclusion that it's setting up the initial spawn area that is causing the massive delay.

In my test:

[14:13:20 INFO]: 'set biome provider' took: 2 ms
[14:13:20 INFO]: 'create dimension key' took: 0 ms
[14:13:20 INFO]: 'create ServerLevel' took: 39 ms
[14:13:20 INFO]: 'setup world border' took: 2 ms
[14:13:20 INFO]: 'initialized serverLevelData' took: 0 ms
[14:13:27 INFO]: 'set initial spawn' took: 6855 ms       #  <-------- eeek, nearly 7 seconds
[14:13:27 INFO]: 'init world' took: 0 ms
[14:13:27 INFO]: Preparing start region for dimension minecraft:world_custom_biomes
[14:13:27 INFO]: Preparing spawn area: 100%

It took almost 7 seconds to setup the initial spawn. This is due to Minecraft having to search around to find a valid spawn area thus having to run thru the chunk generator finding a place a player can safety spawn in at.

Describe the solution you'd like.

I would like something like:
WorldCreator#initialSpawnLocation(Location)

This could be used to override the vanilla setup of the initial spawn.
The dev later on could change the spawn location to suit their needs.

This addition would help speed up custom world creation immensely.

Describe alternatives you've considered.

I have done everything I could think of, including turning off loading spawn chunks.
But after doing all my testing, my only conclusion I could come to is that Minecraft decided the spawn location isn't something I could personally override.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions