[PR #3479] [MERGED] Harness: chunks generated with a world's data packs against vanilla #5009

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3479
Author: @ThatCakeIsAPie
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: feat/datapack-worldgen-4


📝 Commits (7)

  • d1ef7b4 Worldgen: data packs' entries over the prepared bundles
  • 2566257 Worldgen: the generator loads a world's data packs over the bundles
  • b0e65de Data packs: a world's packs change its world generation
  • a849545 Harness: chunks generated with a world's data packs against vanilla
  • 69fc342 Merge remote-tracking branch 'origin/main' into upd/3478
  • 73ae9f6 Merge branch 'upd/3478' into upd/3479
  • dc8f01e Merge main into the branch

📊 Changes

21 files changed (+1045 additions, -51 deletions)

View changed files

📝 README.md (+1 -1)
📝 crates/horizon-client-render/src/biome.rs (+4 -0)
📝 crates/horizon-client-render/src/datapack.rs (+133 -1)
📝 crates/horizon-client/src/game/world_loading.rs (+27 -2)
📝 crates/horizon-client/src/vanillagen.rs (+59 -6)
📝 crates/horizon-world/examples/probe/chunk_dump.rs (+58 -2)
📝 crates/horizon-world/src/worldgen.rs (+1 -0)
📝 crates/horizon-world/src/worldgen/generator.rs (+208 -37)
➕ crates/horizon-world/src/worldgen/overrides.rs (+366 -0)
📝 docs/world-generation.md (+21 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java (+8 -2)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/density_function/final_density.json (+5 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/density_function/hills.json (+10 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/noise/hills.json (+5 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/tags/worldgen/biome/has_structure/igloo.json (+3 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/density_function/overworld/base_3d_noise.json (+8 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/noise/ridge.json (+6 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/noise_settings/overworld.json (+20 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/placed_feature/ore_diamond.json (+16 -0)
➕ tools/fixtures/datapacks/horizon_worldgen_test/pack.mcmeta (+7 -0)

...and 1 more files

📄 Description

🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself.

Builds on #3478 (feat/datapack-worldgen-3): until that merges, its commits show here too; this PR's own change is the commit(s) on top.

What and why

Part 4 of 4, and the background for the series. Players add worldgen data packs to their worlds (the launcher installs them since launcher/src/datapacks.rs), and Horizon ignored their world generation. Parts 1–3 apply it. This part checks it against vanilla and documents it.

  • tools/test_datapack_worldgen_parity.py runs the whole-chunk oracle and chunk_dump with HORIZON_DATAPACKS set to a folder of packs. The oracle (VanillaChunkGenerationOracle) selects every pack of the folder after vanilla through vanilla's own ServerPacksSource pack repository. chunk_dump reads the same packs through worldgen::overrides. Terrain sites over two seeds, first after TERRAIN, then fully decorated, are compared for every block state, quart biome and block entity. Horizon without the packs must differ from vanilla with them, so the harness knows the packs took effect. HORIZON_PARITY_DATAPACKS points it at another folder.
  • tools/fixtures/datapacks/horizon_worldgen_test is Horizon's own pack (MIT, pack_format 121). It overrides a noise, a density function, the Overworld noise settings (sea level 70, no aquifers, a new final density using a new noise), a placed feature and a biome tag, and adds a noise and two density functions.
  • docs/world-generation.md gets a "Data packs" section: what a pack changes, what Horizon leaves out and logs, and that packs must be in 26.3's formats. The README lists world generation among what data packs do.

Vanilla reference

The oracle is vanilla 26.3 itself (ServerPacksSource.createPackRepository, MultiPackResourceManager, RegistryDataLoader), so the comparison is with what a vanilla server generates from the same packs.

Self-check

Tests

python3 tools/test_datapack_worldgen_parity.py (DESKTOP-LT6RAH8, against upstream/main 56f968e11, 9 min 35 s):

12345-terrain: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0)
12345-terrain: without the packs Horizon differs from them in 4 of 4 chunks (91994 blocks)
4242-terrain: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0)
4242-terrain: without the packs Horizon differs from them in 4 of 4 chunks (97942 blocks)
12345-full: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0)
12345-full: without the packs Horizon differs from them in 4 of 4 chunks (96768 blocks)
4242-full: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0)
4242-full: without the packs Horizon differs from them in 4 of 4 chunks (100188 blocks)
Data pack worldgen parity passed

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-LT6RAH8, against upstream/main at fe3333f3f, 10 min 39 s)

Check Result
Scope ⚠️ 21 files, +1042 −51; 981 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 408 run, FAILED (failures=1, skipped=2) (1 min 16 s)
rustfmt ✅ (11 s)
clippy ✅ (57 s)
tests: horizon-client, horizon-world ❌ 1112 passed, 1 failed (6 min 21 s)
doc tests ✅ 0 passed (1 min 47 s)
content root tests ➖ content root untouched
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)

The Scope row counts the whole stack against upstream main; this PR's own part (over feat/datapack-worldgen-3) is 14 files, +247 −5, 140 lines of code.

test_port_publish's test_body_has_names_and_signatures_only fails on upstream main on this Windows machine too (it expects / in a path); CI runs the Python tests on Linux.

save::tests::session_lock_is_exclusive fails on upstream main here too (Windows only).

Suggested label: skip-release.

🤖 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/3479 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `feat/datapack-worldgen-4` --- ### 📝 Commits (7) - [`d1ef7b4`](https://github.com/horizon-rust/horizon/commit/d1ef7b4fb0f6eb9c642837d9941ef986129b93cc) Worldgen: data packs' entries over the prepared bundles - [`2566257`](https://github.com/horizon-rust/horizon/commit/25662576ff54bf5f4e2600ae0c5a1c588c911cb6) Worldgen: the generator loads a world's data packs over the bundles - [`b0e65de`](https://github.com/horizon-rust/horizon/commit/b0e65dec064bb142152fb6445fb5661aeac59ff0) Data packs: a world's packs change its world generation - [`a849545`](https://github.com/horizon-rust/horizon/commit/a849545f63d0d91f4f7c51b8549f3206bc234149) Harness: chunks generated with a world's data packs against vanilla - [`69fc342`](https://github.com/horizon-rust/horizon/commit/69fc342a1a179d67d2c16c1537fc1e494516efbb) Merge remote-tracking branch 'origin/main' into upd/3478 - [`73ae9f6`](https://github.com/horizon-rust/horizon/commit/73ae9f6cf138a805ca963d4b001d252068417850) Merge branch 'upd/3478' into upd/3479 - [`dc8f01e`](https://github.com/horizon-rust/horizon/commit/dc8f01ea193999ec38f91cf2905ba58598a98728) Merge main into the branch ### 📊 Changes **21 files changed** (+1045 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `crates/horizon-client-render/src/biome.rs` (+4 -0) 📝 `crates/horizon-client-render/src/datapack.rs` (+133 -1) 📝 `crates/horizon-client/src/game/world_loading.rs` (+27 -2) 📝 `crates/horizon-client/src/vanillagen.rs` (+59 -6) 📝 `crates/horizon-world/examples/probe/chunk_dump.rs` (+58 -2) 📝 `crates/horizon-world/src/worldgen.rs` (+1 -0) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+208 -37) ➕ `crates/horizon-world/src/worldgen/overrides.rs` (+366 -0) 📝 `docs/world-generation.md` (+21 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java` (+8 -2) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/density_function/final_density.json` (+5 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/density_function/hills.json` (+10 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/horizon_test/worldgen/noise/hills.json` (+5 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/tags/worldgen/biome/has_structure/igloo.json` (+3 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/density_function/overworld/base_3d_noise.json` (+8 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/noise/ridge.json` (+6 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/noise_settings/overworld.json` (+20 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/data/minecraft/worldgen/placed_feature/ore_diamond.json` (+16 -0) ➕ `tools/fixtures/datapacks/horizon_worldgen_test/pack.mcmeta` (+7 -0) _...and 1 more files_ </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. **Builds on #3478 (`feat/datapack-worldgen-3`)**: until that merges, its commits show here too; this PR's own change is the commit(s) on top. ## What and why Part 4 of 4, and the background for the series. Players add worldgen data packs to their worlds (the launcher installs them since `launcher/src/datapacks.rs`), and Horizon ignored their world generation. Parts 1–3 apply it. This part checks it against vanilla and documents it. - `tools/test_datapack_worldgen_parity.py` runs the whole-chunk oracle and `chunk_dump` with `HORIZON_DATAPACKS` set to a folder of packs. The oracle (`VanillaChunkGenerationOracle`) selects every pack of the folder after vanilla through vanilla's own `ServerPacksSource` pack repository. `chunk_dump` reads the same packs through `worldgen::overrides`. Terrain sites over two seeds, first after `TERRAIN`, then fully decorated, are compared for every block state, quart biome and block entity. Horizon without the packs must differ from vanilla with them, so the harness knows the packs took effect. `HORIZON_PARITY_DATAPACKS` points it at another folder. - `tools/fixtures/datapacks/horizon_worldgen_test` is Horizon's own pack (MIT, `pack_format` 121). It overrides a noise, a density function, the Overworld noise settings (sea level 70, no aquifers, a new final density using a new noise), a placed feature and a biome tag, and adds a noise and two density functions. - `docs/world-generation.md` gets a "Data packs" section: what a pack changes, what Horizon leaves out and logs, and that packs must be in 26.3's formats. The README lists world generation among what data packs do. ## Vanilla reference The oracle is vanilla 26.3 itself (`ServerPacksSource.createPackRepository`, `MultiPackResourceManager`, `RegistryDataLoader`), so the comparison is with what a vanilla server generates from the same packs. ## Self-check **Tests** `python3 tools/test_datapack_worldgen_parity.py` (DESKTOP-LT6RAH8, against upstream/main 56f968e11, 9 min 35 s): ``` 12345-terrain: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0) 12345-terrain: without the packs Horizon differs from them in 4 of 4 chunks (91994 blocks) 4242-terrain: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0) 4242-terrain: without the packs Horizon differs from them in 4 of 4 chunks (97942 blocks) 12345-full: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0) 12345-full: without the packs Horizon differs from them in 4 of 4 chunks (96768 blocks) 4242-full: 4 chunks with the packs, differing chunks 0 (blocks 0, biome cells 0, block entities 0) 4242-full: without the packs Horizon differs from them in 4 of 4 chunks (100188 blocks) Data pack worldgen parity passed ``` **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at fe3333f3f, 10 min 39 s) | Check | Result | | --- | --- | | Scope | ⚠️ 21 files, +1042 −51; 981 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 408 run, FAILED (failures=1, skipped=2) (1 min 16 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (57 s) | | tests: horizon-client, horizon-world | ❌ 1112 passed, 1 failed (6 min 21 s) | | doc tests | ✅ 0 passed (1 min 47 s) | | content root tests | ➖ content root untouched | | 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) | The Scope row counts the whole stack against upstream main; this PR's own part (over `feat/datapack-worldgen-3`) is 14 files, +247 −5, 140 lines of code. `test_port_publish`'s `test_body_has_names_and_signatures_only` fails on upstream main on this Windows machine too (it expects `/` in a path); CI runs the Python tests on Linux. `save::tests::session_lock_is_exclusive` fails on upstream main here too (Windows only). Suggested label: `skip-release`. 🤖 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:09:33 +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#5009
No description provided.