Skip to content

Conversation

@Owen1212055
Copy link
Member

@Owen1212055 Owen1212055 commented Dec 20, 2025

This reduces world creation for vanilla worlds from ~1 second to 20ms.

…world creation

This reduces world creation for vanilla worlds from ~1 second to 20ms.
@Owen1212055 Owen1212055 requested a review from a team as a code owner December 20, 2025 03:20
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Dec 20, 2025
@Owen1212055 Owen1212055 changed the title Add an option to WorldCreator to avoid spawn location computation on … Add an option to WorldCreator to avoid spawn location computation on world creation Dec 20, 2025
Copy link
Member

@Malfrador Malfrador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very happy this finally gets added to WorldCreator itself. LGTM, I only have a minor Javadocs suggestion.

@Owen1212055 Owen1212055 moved this from Awaiting review to PR Party candidate in Paper PR Queue Dec 20, 2025
try {
- setInitialSpawn(serverLevel, serverLevelData, worldOptions.generateBonusChest(), isDebugWorld, this.levelLoadListener);
+ setInitialSpawn(serverLevel, serverLevelData, worldOptions.generateBonusChest(), isDebugWorld, serverLevel.levelLoadListener); // Paper - per world level load listener
+ if (computeSpawnLocation) setInitialSpawn(serverLevel, serverLevelData, worldOptions.generateBonusChest(), isDebugWorld, serverLevel.levelLoadListener); // Paper - per world level load listener & rework world loading process
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are gonna run into issues just completely skipping this call to setInitialSpawn. There's a bunch of other stuff in there which still needs to happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, it skips calling setSpawn on the level data leading it to all worlds having the default which includes a GlobalPos to 0, 0, 0 in the overworld, not their specific world.

Also, it skips calling getFixedSpawnLocation on custom chunk generators.

And it skips placing the bonus chest.

And idk if this affects anything, but it skips running the LevelLoadListener.

@github-project-automation github-project-automation bot moved this from PR Party candidate to Changes required in Paper PR Queue Dec 20, 2025
@jpenilla jpenilla self-requested a review December 20, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes required

Development

Successfully merging this pull request may close these issues.

4 participants