[PR #4682] [CLOSED] A local world's biomes include its data packs': colours, spawns, generation, saves #5777

Closed
opened 2026-11-03 05:14:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4682
Author: @ThatCakeIsAPie
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: feat/datapack-biomes-local


📝 Commits (4)

  • a972e24 A local world's biomes include its data packs': colours, spawns, generation, saves
  • 7d5438e Joining a server starts from the built-in biomes, not the last local world's data packs'
  • fe8c8dc Merge remote-tracking branch 'origin/main' into pr-4682
  • 9775e81 A pack biome reaches the window: client meshing uses the world's biome table, and the synchronized biome registry includes the world's data-pack biomes

📊 Changes

28 files changed (+426 additions, -88 deletions)

View changed files

📝 crates/horizon-client-render/src/datapack.rs (+1 -1)
📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+2 -2)
📝 crates/horizon-client/src/game.rs (+40 -14)
📝 crates/horizon-client/src/game/creatures.rs (+3 -2)
📝 crates/horizon-client/src/game/initial_spawn.rs (+1 -1)
📝 crates/horizon-client/src/game/lan.rs (+15 -10)
📝 crates/horizon-client/src/game/moving_pistons.rs (+1 -1)
📝 crates/horizon-client/src/game/music.rs (+6 -8)
📝 crates/horizon-client/src/game/natural_spawning.rs (+1 -1)
📝 crates/horizon-client/src/game/nether_portal.rs (+11 -9)
📝 crates/horizon-client/src/game/packs.rs (+1 -1)
📝 crates/horizon-client/src/game/passengers.rs (+2 -1)
📝 crates/horizon-client/src/game/remote.rs (+8 -3)
📝 crates/horizon-client/src/game/render_tick.rs (+3 -3)
📝 crates/horizon-client/src/game/saving.rs (+1 -1)
📝 crates/horizon-client/src/game/shader_packs.rs (+2 -1)
📝 crates/horizon-client/src/game/world_loading.rs (+42 -14)
📝 crates/horizon-client/src/lan/data.rs (+78 -6)
📝 crates/horizon-client/src/mobs.rs (+2 -1)
📝 crates/horizon-client/src/mobs/world.rs (+1 -1)

...and 8 more files

📄 Description

🤖 Opened by ThatCakeIsAPie's AI agent (Claude Code, Claude Sonnet 5.5), not by ThatCakeIsAPie personally.

What and why

Replaces closed #3492. As the reviewer asked, it is resubmitted as its own small PR against main, rebased on current main (the earlier stack, #3491, is already merged). Size: 24 files, +323 −60; about 122 added / 59 removed lines of Rust, the rest is the test fixture pack and the oracle change.

Opening a local world builds its biome table from the built-in biomes plus its enabled data packs' biome files (Biomes::with_packs, from #3491) and sets it on the shared Resources (set_biomes, now behind an RwLock) before the generator decides which pack biomes to keep. A pack's new biomes then generate, colour, spawn and save by name instead of being left out. Streaming and distant terrain get a worker context carrying that table (PackResources::context_with), and MobWorld holds the table it reads (Arc<Biomes>).

Fixture: tools/fixtures/biome_datapacks (MIT) has three new biomes, one among vanilla's names and two in their own namespace, with their own colours, spawns, features and climate points in a multi-noise Overworld. The chunk generation oracle uses a pack's dimension/<id>.json generator, as a world created with the pack does.

Not in this PR: sending biomes over the network (#3493), and particles, music, ambient sounds, commands and docs (#3494).

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

Data-pack worldgen/biome files and dimension/<id>.json generators in a world's biome registry (net.minecraft.world.level.biome.Biome, MultiNoiseBiomeSource). Harness: HORIZON_PARITY_DATAPACKS=tools/fixtures/biome_datapacks python3 tools/test_datapack_worldgen_parity.py.

Self-check

Run on a Linux box (software GL, no GPU, no vanilla data in .local/), rustc 1.99.1, on top of upstream/main f4da935e0.

CI's verify job, run locally:

  • cargo fmt --all -- --check: pass
  • cargo clippy --workspace --all-targets -- -D warnings: pass
  • cargo clippy -p horizon-client --all-targets --no-default-features -- -D warnings: pass
  • cargo test --workspace --lib --bins --tests --no-fail-fast: 2839 passed, 3 failed, 47 ignored. None of the failures touch this change:
    • gfx::native_post::tests::passes_chain_through_half_float_targets_with_options_and_depth and gfx::frame_gen::optical_flow::tests::finds_a_shift_and_a_scene_change need a real GPU backend (the software GL path rejects textureLoad from depth textures). Both fail the same way on plain upstream/main.
    • horizon-server lists::tests::edits_the_lists_while_stopped looks up a player name against Mojang's services and failed once when the network did not answer; it passed on upstream/main and twice more on this branch.
  • cargo test --workspace --doc: pass (0 run, 1 ignored)
  • python3 -m unittest discover -s tests: 481 passed

pr_ready (tools/pr_ready.py --quick --base upstream/main, against upstream/main at f4da935e0):

Check Result
Scope ✅ 24 files, +323 −60
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed
rustfmt ✅
clippy ✅
tests: horizon-client, horizon-client-render, horizon-world ❌ 1702 passed, 2 failed (the two GPU tests above, also failing on upstream/main)
doc tests ✅
content root tests ➖ content root untouched
Parity ➖ not run (--quick)

Not run: the parity harness (test_datapack_worldgen_parity.py; no vanilla data on this box), the --ignored content-root tests; CI's parity job picks the harness up.

🤖 Generated with Claude Code


🔄 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/4682 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/datapack-biomes-local` --- ### 📝 Commits (4) - [`a972e24`](https://github.com/horizon-rust/horizon/commit/a972e243800f9ad6f138d35100cc84d9cbdf7ac5) A local world's biomes include its data packs': colours, spawns, generation, saves - [`7d5438e`](https://github.com/horizon-rust/horizon/commit/7d5438e118a016d256b4793ad7a94a640f7ff369) Joining a server starts from the built-in biomes, not the last local world's data packs' - [`fe8c8dc`](https://github.com/horizon-rust/horizon/commit/fe8c8dcbe2083fcf128e4e7670ecbec2a3c9827f) Merge remote-tracking branch 'origin/main' into pr-4682 - [`9775e81`](https://github.com/horizon-rust/horizon/commit/9775e816dcac1417fce17363728e43c22a50838c) A pack biome reaches the window: client meshing uses the world's biome table, and the synchronized biome registry includes the world's data-pack biomes ### 📊 Changes **28 files changed** (+426 additions, -88 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/datapack.rs` (+1 -1) 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+2 -2) 📝 `crates/horizon-client/src/game.rs` (+40 -14) 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -2) 📝 `crates/horizon-client/src/game/initial_spawn.rs` (+1 -1) 📝 `crates/horizon-client/src/game/lan.rs` (+15 -10) 📝 `crates/horizon-client/src/game/moving_pistons.rs` (+1 -1) 📝 `crates/horizon-client/src/game/music.rs` (+6 -8) 📝 `crates/horizon-client/src/game/natural_spawning.rs` (+1 -1) 📝 `crates/horizon-client/src/game/nether_portal.rs` (+11 -9) 📝 `crates/horizon-client/src/game/packs.rs` (+1 -1) 📝 `crates/horizon-client/src/game/passengers.rs` (+2 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+8 -3) 📝 `crates/horizon-client/src/game/render_tick.rs` (+3 -3) 📝 `crates/horizon-client/src/game/saving.rs` (+1 -1) 📝 `crates/horizon-client/src/game/shader_packs.rs` (+2 -1) 📝 `crates/horizon-client/src/game/world_loading.rs` (+42 -14) 📝 `crates/horizon-client/src/lan/data.rs` (+78 -6) 📝 `crates/horizon-client/src/mobs.rs` (+2 -1) 📝 `crates/horizon-client/src/mobs/world.rs` (+1 -1) _...and 8 more files_ </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude Code, Claude Sonnet 5.5), not by ThatCakeIsAPie personally. ## What and why Replaces closed #3492. As the reviewer asked, it is resubmitted as its own small PR against main, rebased on current main (the earlier stack, #3491, is already merged). Size: 24 files, +323 −60; about 122 added / 59 removed lines of Rust, the rest is the test fixture pack and the oracle change. Opening a local world builds its biome table from the built-in biomes plus its enabled data packs' biome files (`Biomes::with_packs`, from #3491) and sets it on the shared `Resources` (`set_biomes`, now behind an `RwLock`) before the generator decides which pack biomes to keep. A pack's new biomes then generate, colour, spawn and save by name instead of being left out. Streaming and distant terrain get a worker context carrying that table (`PackResources::context_with`), and `MobWorld` holds the table it reads (`Arc<Biomes>`). Fixture: `tools/fixtures/biome_datapacks` (MIT) has three new biomes, one among vanilla's names and two in their own namespace, with their own colours, spawns, features and climate points in a multi-noise Overworld. The chunk generation oracle uses a pack's `dimension/<id>.json` generator, as a world created with the pack does. Not in this PR: sending biomes over the network (#3493), and particles, music, ambient sounds, commands and docs (#3494). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference Data-pack `worldgen/biome` files and `dimension/<id>.json` generators in a world's biome registry (`net.minecraft.world.level.biome.Biome`, `MultiNoiseBiomeSource`). Harness: `HORIZON_PARITY_DATAPACKS=tools/fixtures/biome_datapacks python3 tools/test_datapack_worldgen_parity.py`. ## Self-check Run on a Linux box (software GL, no GPU, no vanilla data in `.local/`), rustc 1.99.1, on top of upstream/main f4da935e0. CI's verify job, run locally: - `cargo fmt --all -- --check`: pass - `cargo clippy --workspace --all-targets -- -D warnings`: pass - `cargo clippy -p horizon-client --all-targets --no-default-features -- -D warnings`: pass - `cargo test --workspace --lib --bins --tests --no-fail-fast`: 2839 passed, 3 failed, 47 ignored. None of the failures touch this change: - `gfx::native_post::tests::passes_chain_through_half_float_targets_with_options_and_depth` and `gfx::frame_gen::optical_flow::tests::finds_a_shift_and_a_scene_change` need a real GPU backend (the software GL path rejects `textureLoad` from depth textures). Both fail the same way on plain upstream/main. - `horizon-server lists::tests::edits_the_lists_while_stopped` looks up a player name against Mojang's services and failed once when the network did not answer; it passed on upstream/main and twice more on this branch. - `cargo test --workspace --doc`: pass (0 run, 1 ignored) - `python3 -m unittest discover -s tests`: 481 passed **pr_ready** (`tools/pr_ready.py --quick --base upstream/main`, against upstream/main at f4da935e0): | Check | Result | | --- | --- | | Scope | ✅ 24 files, +323 −60 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client, horizon-client-render, horizon-world | ❌ 1702 passed, 2 failed (the two GPU tests above, also failing on upstream/main) | | doc tests | ✅ | | content root tests | ➖ content root untouched | | Parity | ➖ not run (--quick) | Not run: the parity harness (`test_datapack_worldgen_parity.py`; no vanilla data on this box), the `--ignored` content-root tests; CI's parity job picks the harness up. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:55 +07:00
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#5777
No description provided.