[PR #7612] World creation: generate the selected single biome #7715

Open
opened 2026-11-03 07:22:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7612
Author: @masa-masa-0314
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/single-biome-generator


📝 Commits (1)

  • 9cb5565 World creation: generate the selected single biome

📊 Changes

3 files changed (+47 additions, -12 deletions)

View changed files

📝 crates/horizon-client/src/game/world_loading.rs (+4 -1)
📝 crates/horizon-client/src/vanillagen.rs (+20 -1)
📝 crates/horizon-world/src/worldgen/generator.rs (+23 -10)

📄 Description

🤖 Opened by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally.

What and why

Fixes #7501.

The single-biome Customize editor already exists on this baseline (#2a53f80b1), and saves the selected biome in level.dat. Terrain loading nevertheless reconstructed the noise generator from the preset alone, so a saved jungle/desert choice could still generate plains.

Pass the saved dimension stem through VanillaTerrain into OverworldGenerator. Resolve a datapack dimension first, then the saved stem, then the preset fallback. This preserves the selected biome source, saved custom noise settings and dimension type on creation and reload, while keeping existing APIs and datapack precedence.

Three files, +47/-12. No UI replacement or unrelated online functionality.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Independently inspected installed 26.3 bytecode: PresetEditor.fixedBiomeConfigurator creates a FixedBiomeSource with the chosen biome and the Overworld noise settings; WorldDimensions.bake resolves registry-provided dimensions before saved dimensions.

Temporary actual-generator probe reproduced the old jungle/desert-to-plains path and passed the repaired path: all 1,536 biome cells for each chosen biome, real region save/reload, new chunks after settings reload, and recreated options. Default same-seed generation matched 98,304 blocks and 1,536 biome cells. Datapack dimension precedence and saved custom noise settings (including missing preset fallback avoidance) were verified.

The probe exercises save/generator/region paths, not interactive GUI or a live gameplay make_streaming run. New temporary tests are archived locally and omitted per contributor preference; no new permanent regression coverage is added, and existing tests remain intact. Full differential parity harnesses were not run (--quick).

Other projects' code

None.

Self-check

Frozen upstream baseline: 02c8607ee8. The following block is the original final-diff self-check output:

pr_ready (tools/pr_ready.py --quick --base 02c8607ee8ebd216f2f535c1eb7b62b572830df2 on DESKTOP-3050AHP, against 02c8607ee8 at 02c8607ee, 14 min 5 s)

Check Result
Scope ✅ 3 files, +47 −12
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (2 min 55 s)
rustfmt ✅ (17 s)
clippy ✅ (2 min 22 s)
tests: horizon-client, horizon-client-lib, horizon-world ✅ 2559 passed (7 min 29 s)
doc tests ✅ 0 passed (11 s)
content root tests ➖ content root untouched
mod API up to date ✅ (46 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Screenshots

No GUI screenshots captured. Actual chunk generation was tested as described above.

🤖 Generated with ZCode (GPT-6).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7612 **Author:** [@masa-masa-0314](https://github.com/masa-masa-0314) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/single-biome-generator` --- ### 📝 Commits (1) - [`9cb5565`](https://github.com/horizon-rust/horizon/commit/9cb556525e245cb80bd243b4377894c2b3b997ae) World creation: generate the selected single biome ### 📊 Changes **3 files changed** (+47 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/world_loading.rs` (+4 -1) 📝 `crates/horizon-client/src/vanillagen.rs` (+20 -1) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+23 -10) </details> ### 📄 Description > 🤖 Opened by masa-masa-0314's AI agent (ZCode, GPT-6), not by masa-masa-0314 personally. ## What and why Fixes #7501. The single-biome Customize editor already exists on this baseline (#2a53f80b1), and saves the selected biome in level.dat. Terrain loading nevertheless reconstructed the noise generator from the preset alone, so a saved jungle/desert choice could still generate plains. Pass the saved dimension stem through VanillaTerrain into OverworldGenerator. Resolve a datapack dimension first, then the saved stem, then the preset fallback. This preserves the selected biome source, saved custom noise settings and dimension type on creation and reload, while keeping existing APIs and datapack precedence. Three files, +47/-12. No UI replacement or unrelated online functionality. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Independently inspected installed 26.3 bytecode: PresetEditor.fixedBiomeConfigurator creates a FixedBiomeSource with the chosen biome and the Overworld noise settings; WorldDimensions.bake resolves registry-provided dimensions before saved dimensions. Temporary actual-generator probe reproduced the old jungle/desert-to-plains path and passed the repaired path: all 1,536 biome cells for each chosen biome, real region save/reload, new chunks after settings reload, and recreated options. Default same-seed generation matched 98,304 blocks and 1,536 biome cells. Datapack dimension precedence and saved custom noise settings (including missing preset fallback avoidance) were verified. The probe exercises save/generator/region paths, not interactive GUI or a live gameplay make_streaming run. New temporary tests are archived locally and omitted per contributor preference; no new permanent regression coverage is added, and existing tests remain intact. Full differential parity harnesses were not run (--quick). ## Other projects' code None. ## Self-check Frozen upstream baseline: 02c8607ee8ebd216f2f535c1eb7b62b572830df2. The following block is the original final-diff self-check output: **pr_ready** (`tools/pr_ready.py --quick --base 02c8607ee8ebd216f2f535c1eb7b62b572830df2` on DESKTOP-3050AHP, against 02c8607ee8ebd216f2f535c1eb7b62b572830df2 at 02c8607ee, 14 min 5 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +47 −12 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (2 min 55 s) | | rustfmt | ✅ (17 s) | | clippy | ✅ (2 min 22 s) | | tests: horizon-client, horizon-client-lib, horizon-world | ✅ 2559 passed (7 min 29 s) | | doc tests | ✅ 0 passed (11 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (46 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Screenshots No GUI screenshots captured. Actual chunk generation was tested as described above. 🤖 Generated with ZCode (GPT-6). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7715
No description provided.