Files
Pumpkin/crates
MCbabel b0d2dfa434 fix(world): load level.dat instead of discarding it (#2804)
`AnvilLevelInfo::read_world_info` validated the version tags and then returned
`LevelData::default(Seed(0))`, so level name, difficulty, spawn, world border
and data packs were discarded on every start, and the writer emitted only
`DataVersion`, `version` and `LastPlayed`, truncating the rest on save. A world
whose seed lives in level.dat's legacy `Data.WorldGenSettings` compound, as
converters such as Chunker emit, therefore loaded with seed 0 and generated
foreign terrain into its existing region files.

level.dat is now read and written tag by tag through pumpkin-nbt, every field
falling back to its vanilla default, so a missing optional tag such as
`Version.Series` no longer costs the whole file. Saving merges into the existing
`Data` compound, so tags Pumpkin does not model survive. A world with no seed
in either file aborts startup instead of silently regenerating, and the seed is
mirrored into level.dat, the only world file that is backed up. Version tags are
re-stamped with the current constants on save so level.dat stays consistent with
the chunks Pumpkin writes.
2026-08-07 10:09:06 +02:00
..
2026-08-06 12:56:40 +02:00