[PR #3372] [MERGED] port-pack: upgrade-datapack rewrites noise settings, dimensions and presets #4939

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

📋 Pull Request Information

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

Base: main ← Head: feat/upgrade-datapack-2b


📝 Commits (6)

  • 81b3803 port-pack: upgrade-datapack, a 26.2 data pack's registries in 26.3's formats
  • 2aca6fe port-pack: upgrade-datapack rewrites density functions
  • 3d39bbd port-pack: upgrade-datapack rewrites noise settings, dimensions and presets
  • 0771f59 upgrade-datapack: refuse pack entries that leave the pack
  • 825f8f8 Merge feat/upgrade-datapack-1: refuse pack entries that leave the pack
  • 217216e Merge feat/upgrade-datapack-2a: refuse pack entries that leave the pack

📊 Changes

8 files changed (+1485 additions, -3 deletions)

View changed files

📝 crates/horizon-port-pack/Cargo.toml (+3 -1)
📝 crates/horizon-port-pack/src/lib.rs (+1 -0)
📝 crates/horizon-port-pack/src/main.rs (+22 -2)
➕ crates/horizon-port-pack/src/upgrade/density.rs (+323 -0)
➕ crates/horizon-port-pack/src/upgrade/mod.rs (+604 -0)
➕ crates/horizon-port-pack/src/upgrade/noise.rs (+112 -0)
➕ crates/horizon-port-pack/src/upgrade/registries.rs (+168 -0)
➕ crates/horizon-port-pack/src/upgrade/settings.rs (+252 -0)

📄 Description

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

Builds on #3370 (feat/upgrade-datapack-2a): until that merges, its commits show here too; this PR's own change is the last commit(s) on top of it.

What and why

Part 3 of 5 of horizon-port-pack upgrade-datapack. This part rewrites noise settings in 26.3's form. The parts 26.2 hard-coded in Java are written out as data, so the 26.3 pack generates what the 26.2 pack did:

  • final density: 26.2's NoiseChunk added the beardifier, so it is now add(final_density, beardifier), as vanilla's own overworld/final_density;
  • aquifers: barrier, fluid_level_* and lava move from the router to aquifers. Its exclusion spells out 26.2's OverworldBiomeBuilder.isDeepDarkRegion (erosion < -0.225 and depth > 0.9) from the pack's own erosion and depth. surface_level is the preliminary surface, and chunk_surface_level is its per-chunk 16 x 1 interpolation, which 26.2 did in code;
  • ore veins: 26.2's OreVeinifier becomes two ore_vein material rules (copper, iron) with its heights, thresholds, edge roundoff, solidness, richness and gap. They come ahead of the surface rule, because 26.2 placed veins while filling the noise and its surface pass only replaced the default block;
  • surface rule: it becomes the named material_rule <settings>/upgraded/material_rule, so vanilla's other settings keep theirs;
  • spawn target: it names the climate functions by id (each climate function is written as a named function). depth and offset are dropped, as vanilla did, and reported when not 0;
  • size_horizontal/size_vertical are dropped, since each interpolated now holds its cell (part 2);
  • inline noise settings in dimension/ files and world presets get the same.

Vanilla reference

26.2's NoiseChunk (beardifier, preliminary surface interpolation), OreVeinifier, Aquifer.NoiseBasedAquifer with OverworldBiomeBuilder.isDeepDarkRegion, and NoiseGeneratorSettings against 26.3's NoiseGeneratorSettings, aquifers and ore_vein material rule codecs; vanilla 26.3's overworld settings for the target form. The unit tests cover the settings move and the cell taken from the settings. tools/datapack_upgrade_fidelity.py (part 5) checks generated terrain on vanilla's 26.2 and 26.3 servers. Tooling: no harness.

Self-check

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

Check Result
Scope ⚠️ 8 files, +1439 −3; 1442 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 401 run, FAILED (failures=1, errors=1, skipped=1) (2 min 30 s)
rustfmt ✅ (15 s)
clippy ✅ (49 s)
tests: horizon-port-pack ✅ 75 passed (56 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ❌ failed (40 s)
launcher tests ✅ 212 passed (1 min 9 s)
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 that fail here fail the same way on upstream main on this Windows machine (symlink privilege, path separators); they're independent of this change, and CI runs them on Linux. Launcher clippy fails on Windows on upstream main too: an unused CommandExt import in launcher/src/sources.rs (9f1fa0a0a), which this change doesn't touch; #3363 removes it.

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/3372 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/upgrade-datapack-2b` --- ### 📝 Commits (6) - [`81b3803`](https://github.com/horizon-rust/horizon/commit/81b38030176f5e9e8beac500403a80265e88ce64) port-pack: upgrade-datapack, a 26.2 data pack's registries in 26.3's formats - [`2aca6fe`](https://github.com/horizon-rust/horizon/commit/2aca6fe06c3a9f551d2b1566acafe0043318d8f9) port-pack: upgrade-datapack rewrites density functions - [`3d39bbd`](https://github.com/horizon-rust/horizon/commit/3d39bbdaf1ab25d57bd32a3273ca38b88fdf45ec) port-pack: upgrade-datapack rewrites noise settings, dimensions and presets - [`0771f59`](https://github.com/horizon-rust/horizon/commit/0771f59bca57243d668e2aafbed932dfe25f38d6) upgrade-datapack: refuse pack entries that leave the pack - [`825f8f8`](https://github.com/horizon-rust/horizon/commit/825f8f8845503b37435f329f3f1ecfb400573c63) Merge feat/upgrade-datapack-1: refuse pack entries that leave the pack - [`217216e`](https://github.com/horizon-rust/horizon/commit/217216e263333f004be19bdb07645d2eebe84dbf) Merge feat/upgrade-datapack-2a: refuse pack entries that leave the pack ### 📊 Changes **8 files changed** (+1485 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/Cargo.toml` (+3 -1) 📝 `crates/horizon-port-pack/src/lib.rs` (+1 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+22 -2) ➕ `crates/horizon-port-pack/src/upgrade/density.rs` (+323 -0) ➕ `crates/horizon-port-pack/src/upgrade/mod.rs` (+604 -0) ➕ `crates/horizon-port-pack/src/upgrade/noise.rs` (+112 -0) ➕ `crates/horizon-port-pack/src/upgrade/registries.rs` (+168 -0) ➕ `crates/horizon-port-pack/src/upgrade/settings.rs` (+252 -0) </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. **Builds on #3370** (`feat/upgrade-datapack-2a`): until that merges, its commits show here too; this PR's own change is the last commit(s) on top of it. ## What and why Part 3 of 5 of `horizon-port-pack upgrade-datapack`. This part rewrites noise settings in 26.3's form. The parts 26.2 hard-coded in Java are written out as data, so the 26.3 pack generates what the 26.2 pack did: - **final density**: 26.2's `NoiseChunk` added the beardifier, so it is now `add(final_density, beardifier)`, as vanilla's own `overworld/final_density`; - **aquifers**: `barrier`, `fluid_level_*` and `lava` move from the router to `aquifers`. Its `exclusion` spells out 26.2's `OverworldBiomeBuilder.isDeepDarkRegion` (erosion < -0.225 and depth > 0.9) from the pack's own erosion and depth. `surface_level` is the preliminary surface, and `chunk_surface_level` is its per-chunk 16 x 1 interpolation, which 26.2 did in code; - **ore veins**: 26.2's `OreVeinifier` becomes two `ore_vein` material rules (copper, iron) with its heights, thresholds, edge roundoff, solidness, richness and gap. They come ahead of the surface rule, because 26.2 placed veins while filling the noise and its surface pass only replaced the default block; - **surface rule**: it becomes the named `material_rule` `<settings>/upgraded/material_rule`, so vanilla's other settings keep theirs; - **spawn target**: it names the climate functions by id (each climate function is written as a named function). `depth` and `offset` are dropped, as vanilla did, and reported when not 0; - `size_horizontal`/`size_vertical` are dropped, since each `interpolated` now holds its cell (part 2); - inline noise settings in `dimension/` files and world presets get the same. ## Vanilla reference 26.2's `NoiseChunk` (beardifier, preliminary surface interpolation), `OreVeinifier`, `Aquifer.NoiseBasedAquifer` with `OverworldBiomeBuilder.isDeepDarkRegion`, and `NoiseGeneratorSettings` against 26.3's `NoiseGeneratorSettings`, `aquifers` and `ore_vein` material rule codecs; vanilla 26.3's `overworld` settings for the target form. The unit tests cover the settings move and the cell taken from the settings. `tools/datapack_upgrade_fidelity.py` (part 5) checks generated terrain on vanilla's 26.2 and 26.3 servers. Tooling: no harness. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at e1b2b0b2f, 6 min 32 s) | Check | Result | | --- | --- | | Scope | ⚠️ 8 files, +1439 −3; 1442 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 401 run, FAILED (failures=1, errors=1, skipped=1) (2 min 30 s) | | rustfmt | ✅ (15 s) | | clippy | ✅ (49 s) | | tests: horizon-port-pack | ✅ 75 passed (56 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ❌ failed (40 s) | | launcher tests | ✅ 212 passed (1 min 9 s) | | 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 that fail here fail the same way on upstream main on this Windows machine (symlink privilege, path separators); they're independent of this change, and CI runs them on Linux. Launcher clippy fails on Windows on upstream main too: an unused `CommandExt` import in `launcher/src/sources.rs` (9f1fa0a0a), which this change doesn't touch; #3363 removes it. 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:03 +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#4939
No description provided.