[PR #3476] [MERGED] Worldgen: data packs' entries over the prepared bundles #5007

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/3476
Author: @ThatCakeIsAPie
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

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


📝 Commits (2)

  • d1ef7b4 Worldgen: data packs' entries over the prepared bundles
  • 0a00df7 Merge main into the branch

📊 Changes

2 files changed (+367 additions, -0 deletions)

View changed files

📝 crates/horizon-world/src/worldgen.rs (+1 -0)
➕ crates/horizon-world/src/worldgen/overrides.rs (+366 -0)

📄 Description

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

What and why

Part 1 of 4 of applying a world's data packs to its world generation (docs/ and the background are in part 4). Today Horizon reads a world's packs only for functions, tags and predicates (datapack.rs). The chunk generator always uses the prepared bundles, so a worldgen pack such as one that reshapes the terrain does nothing.

This part adds horizon_world::worldgen::overrides and nothing else. Nothing calls it yet; part 2 makes the generator read through it.

  • WorldgenOverrides::add_file maps a pack file data/<ns>/<kind>/<path>.json to the bundle it joins: worldgen/noise → noises, density_function → densities, noise_settings → settings, material_rule/material_condition, carver, feature, placed_feature, structure, structure_set, template_pool, processor_list, biome, and dimension/ level stems. Carvers and features use 26.3's folder names (worldgen/carver, worldgen/feature). 26.2's configured_* folders are reported as not read.
  • Packs come lowest first, and a later pack's file for an id replaces an earlier one's (vanilla's MultiPackResourceManager). Block, fluid and biome tag files are kept per pack in order, because vanilla's TagLoader adds every pack's entries (and replace drops what came before). apply puts the packs' entries over a bundle.
  • finish leaves out a pack's new biomes: Horizon has no colours, sounds or registry id for them yet. The biome tag entries and multi-noise climate points that name them are left out too, and every left-out entry is listed for the log. A pack's changes to vanilla's own biomes are kept.
  • dimension_type/ files are reported (PackFile::DimensionType), not applied. Every level keeps its vanilla build height until the client's chunks can hold another one.

Vanilla reference

MultiPackResourceManager (later pack wins), TagLoader / TagEntry (tag files merge across packs), RegistryDataLoader (the worldgen registries read from the selected packs). The folder names are 26.3's Registries keys.

Self-check

Tests

Unit tests in overrides.rs: the highest pack wins, new ids join, files reach their bundles (the 26.3 carver and feature folders included, 26.2's names reported), and new biomes are left out of tags and climate points. The behaviour is checked against vanilla in part 4 (tools/test_datapack_worldgen_parity.py).

Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3479).

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 6 min 33 s)

Check Result
Scope ✅ 2 files, +367 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 30 s)
rustfmt ✅ (12 s)
clippy ✅ (3 min 21 s)
tests: horizon-world ✅ 259 passed (1 min 25 s)
doc tests ✅ 0 passed (2 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 Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux.

Suggested label: skip-release (nothing calls it yet).

🤖 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/3476 **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-1` --- ### 📝 Commits (2) - [`d1ef7b4`](https://github.com/horizon-rust/horizon/commit/d1ef7b4fb0f6eb9c642837d9941ef986129b93cc) Worldgen: data packs' entries over the prepared bundles - [`0a00df7`](https://github.com/horizon-rust/horizon/commit/0a00df76402193b0711d7bec4505ab4932958a37) Merge main into the branch ### 📊 Changes **2 files changed** (+367 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen.rs` (+1 -0) ➕ `crates/horizon-world/src/worldgen/overrides.rs` (+366 -0) </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. ## What and why Part 1 of 4 of applying a world's data packs to its world generation (`docs/` and the background are in part 4). Today Horizon reads a world's packs only for functions, tags and predicates (`datapack.rs`). The chunk generator always uses the prepared bundles, so a worldgen pack such as one that reshapes the terrain does nothing. This part adds `horizon_world::worldgen::overrides` and nothing else. Nothing calls it yet; part 2 makes the generator read through it. - `WorldgenOverrides::add_file` maps a pack file `data/<ns>/<kind>/<path>.json` to the bundle it joins: `worldgen/noise` → `noises`, `density_function` → `densities`, `noise_settings` → `settings`, `material_rule`/`material_condition`, `carver`, `feature`, `placed_feature`, `structure`, `structure_set`, `template_pool`, `processor_list`, `biome`, and `dimension/` level stems. Carvers and features use 26.3's folder names (`worldgen/carver`, `worldgen/feature`). 26.2's `configured_*` folders are reported as not read. - Packs come lowest first, and a later pack's file for an id replaces an earlier one's (vanilla's `MultiPackResourceManager`). Block, fluid and biome tag files are kept per pack in order, because vanilla's `TagLoader` adds every pack's entries (and `replace` drops what came before). `apply` puts the packs' entries over a bundle. - `finish` leaves out a pack's **new** biomes: Horizon has no colours, sounds or registry id for them yet. The biome tag entries and multi-noise climate points that name them are left out too, and every left-out entry is listed for the log. A pack's changes to vanilla's own biomes are kept. - `dimension_type/` files are reported (`PackFile::DimensionType`), not applied. Every level keeps its vanilla build height until the client's chunks can hold another one. ## Vanilla reference `MultiPackResourceManager` (later pack wins), `TagLoader` / `TagEntry` (tag files merge across packs), `RegistryDataLoader` (the worldgen registries read from the selected packs). The folder names are 26.3's `Registries` keys. ## Self-check **Tests** Unit tests in `overrides.rs`: the highest pack wins, new ids join, files reach their bundles (the 26.3 carver and feature folders included, 26.2's names reported), and new biomes are left out of tags and climate points. The behaviour is checked against vanilla in part 4 (`tools/test_datapack_worldgen_parity.py`). Run before this branch was rebased from upstream/main 56f968e11 onto fe3333f3f. After the rebase, CI's two clippy commands pass on it again, and pr_ready was re-run at the top of its series (#3479). **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at 56f968e11, 6 min 33 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +367 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 398 run, FAILED (failures=2, errors=8, skipped=1) (1 min 30 s) | | rustfmt | ✅ (12 s) | | clippy | ✅ (3 min 21 s) | | tests: horizon-world | ✅ 259 passed (1 min 25 s) | | doc tests | ✅ 0 passed (2 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 Python tests fail on upstream main on this Windows machine too, more often there (main 56f968e11: failures=3, errors=13; path separators, symlink privilege). CI runs them on Linux. Suggested label: `skip-release` (nothing calls it yet). 🤖 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#5007
No description provided.