Skip to content

Change world storage layout to be closer to vanilla & implement migration#13736

Merged
jpenilla merged 14 commits intodev/26.1from
dev/26.1-world-layout
Apr 3, 2026
Merged

Change world storage layout to be closer to vanilla & implement migration#13736
jpenilla merged 14 commits intodev/26.1from
dev/26.1-world-layout

Conversation

@jpenilla
Copy link
Copy Markdown
Member

@jpenilla jpenilla commented Apr 3, 2026

This moves world storage to use a modified vanilla layout instead of continuing to carry forward legacy CraftBukkit baggage.

  • Uses <level name>/dimensions/<location> i.e. world/dimensions/minecraft/overworld like vanilla.
  • paper-world.yml now goes in that directory
  • Instead of having duplicated level.dat for each world, worlds have a paper:level-overrides data.
  • For vanilla data that we make per-world, it moves into the dimension's data path instead of each world having a second data in it's split root directory.
  • PDC moves to paper:persistent-data-container, UUID into paper:metadata. Names can still be derived from folder structure.
  • API worlds keep their minecraft namespaced keys for now
  • custom non-default world keys are rejected (WorldCreator). These were never persisted.
  • --forceUpgrade / recreate-region-files are not wired up for this layout yet, so they are explicitly disabled

This also adds migration support for both:

  • existing Vanilla worlds
  • legacy CraftBukkit-style split root world folders

Migration has been tested in a local matrix including Paper, Vanilla, Datapack, and API source data from multiple versions with custom level names and world containers.

@jpenilla jpenilla requested a review from a team as a code owner April 3, 2026 00:04
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Apr 3, 2026
@jpenilla jpenilla added priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon. dev/next Changes related to the snapshot / next branch labels Apr 3, 2026
@Doc94

This comment was marked as resolved.

@jpenilla
Copy link
Copy Markdown
Member Author

jpenilla commented Apr 3, 2026

@Doc94 should be fixed now

@jpenilla jpenilla added the publish-pr Enables a workflow to build Paperclip jars on the pull request. label Apr 3, 2026
@papermc-pr-publishing
Copy link
Copy Markdown

papermc-pr-publishing bot commented Apr 3, 2026

Last updated for: 2024b0def3ce7914763b51e7ac3e66e24bf9562f.

Download the Paperclip jar for this pull request: paper-13736.zip

Maven Publication

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven("https://maven-prs.papermc.io/Paper/pr13736") {
        name = "Maven for PR #13736" // https://github.com/PaperMC/Paper/pull/13736
        mavenContent {
            includeModule("io.papermc.paper", "dev-bundle")
            includeModule("io.papermc.paper", "paper-api")
        }
    }
}

@Grabsky
Copy link
Copy Markdown

Grabsky commented Apr 3, 2026

Seems like converter fails with symlinked files. Perhaps a vanilla bug?
https://pastes.dev/AJnHhbz1sV

# bukkit.yml
settings:
  world-container: worlds
# worlds/allowed_symlinks.txt
[regex].*
Folder Structure image

@Doc94

This comment was marked as resolved.

@electronicboy
Copy link
Copy Markdown
Member

Seems like converter fails with symlinked files. Perhaps a vanilla bug?

Not a bug, intentional vanilla bailout. Moving file structures around with symlinks involved is generally a good way to break stuff, given their often relative nature. You can't just safely move those around without an entire list of considerations which they, and more than likely us, would not want to deal with

@benwoo1110

This comment was marked as resolved.

@benwoo1110

This comment was marked as resolved.

@Bobcat00

This comment was marked as resolved.

@qheilmann

This comment was marked as resolved.

@tehbeard

This comment was marked as resolved.

@jpenilla
Copy link
Copy Markdown
Member Author

jpenilla commented Apr 3, 2026

@Doc94
That seems to be from using dev/26.1 which is broken, can't reproduce with only this branch.

@benwoo1110
World folder return just needed to be updated.
'Not attached overrides' is fixed.
Changing env is working as intended. World identity is now strictly derived from dimension key (which is derived from name for API worlds), environment (level stem) is no longer baked into the directory structure. If you load a world with a different environment it will now load that world, not some conceptual "nether of" or "overworld of" the world.
Arbitrary folder migration/deletion on API world load with matching name is fixed. Checks for level data.

@jpenilla
Copy link
Copy Markdown
Member Author

jpenilla commented Apr 3, 2026

@Bobcat00 Yes it's expected for those directories to be created by the vanilla logic before our migration runs. But it's not expected for the restart to attempt migrating them. Should be fixed now.

A remaining edge case is you will get the harmless delay & no-op migration if you migrate a world with end/nether disabled from an old version, and then later enable them.

@benwoo1110
Copy link
Copy Markdown

@jpenilla thanks for the quick update! I have tested and confirmed that the latest commits fixed the issues I raised!

Adding on to the updated world folder return, I am thinking Bukkit#getWorldContainer() should also be updated to <level name>/dimensions/ as well? What do you think?

…olete

The concept still exists, we do not need to deprecate it. But it's no longer useful now that all worlds are in the same level directory.
@jpenilla
Copy link
Copy Markdown
Member Author

jpenilla commented Apr 3, 2026

@tehbeard
should be fixed now

@benwoo1110
6ffbcae

@jpenilla jpenilla merged commit 2d6e82e into dev/26.1 Apr 3, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting review to Merged in Paper PR Queue Apr 3, 2026
@jpenilla jpenilla deleted the dev/26.1-world-layout branch April 3, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/next Changes related to the snapshot / next branch priority: high This issue is either a gamebreaking bug or crash and needs to be addressed soon. publish-pr Enables a workflow to build Paperclip jars on the pull request.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

10 participants