[PR #3373] [MERGED] port-pack: upgrade-datapack rewrites features and placements #4940

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

📋 Pull Request Information

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

Base: main ← Head: feat/upgrade-datapack-3


📝 Commits (8)

  • 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
  • f983223 port-pack: upgrade-datapack rewrites features and placements
  • 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
  • 1ffe686 Merge feat/upgrade-datapack-2b: refuse pack entries that leave the pack

📊 Changes

9 files changed (+1633 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/features.rs (+122 -0)
➕ crates/horizon-port-pack/src/upgrade/mod.rs (+630 -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 #3372 (feat/upgrade-datapack-2b): 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 4 of 5 of horizon-port-pack upgrade-datapack (26.2 data packs in 26.3's formats; part 1 has the command and the background):

  • features: configured features move to feature/ with config unwrapped. Block state providers take their 26.3 names (weighted_state_provider becomes weighted, and so on; a simple_state_provider is just its state). Nested and inline placed features are upgraded with them. Feature types that 26.3 replaced with compositions of other features (seagrass, kelp, basalt_columns, random_patch and others) are listed in the report as left as they are: the upgrade does not write vanilla's compositions;
  • placement: random_offset (xz_spread, y_spread) becomes offset with one provider per axis, x and z both from xz_spread.

The feature conversion holds no state, so it is free functions in upgrade/features.rs.

Vanilla reference

26.2's ConfiguredFeature codec (type + config), its block state provider types, and RandomOffsetPlacement, against 26.3's feature codec, providers and OffsetPlacement. A unit test covers the config unwrap, the provider rename and the offset. tools/datapack_upgrade_rosetta.py (part 5) compares vanilla 26.2's own features, upgraded, with 26.3's. Tooling: no harness.

Self-check

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

Check Result
Scope ⚠️ 9 files, +1587 −3; 1590 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) (1 min 48 s)
rustfmt ✅ (15 s)
clippy ✅ (3 s)
tests: horizon-port-pack ✅ 76 passed (6 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ❌ failed (18 s)
launcher tests ✅ 212 passed (27 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/3373 **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-3` --- ### 📝 Commits (8) - [`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 - [`f983223`](https://github.com/horizon-rust/horizon/commit/f9832233540ce7455e806cb41f541982350717e4) port-pack: upgrade-datapack rewrites features and placements - [`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 - [`1ffe686`](https://github.com/horizon-rust/horizon/commit/1ffe686350daf1ac2bb8867d1e48e909ca0b8721) Merge feat/upgrade-datapack-2b: refuse pack entries that leave the pack ### 📊 Changes **9 files changed** (+1633 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/features.rs` (+122 -0) ➕ `crates/horizon-port-pack/src/upgrade/mod.rs` (+630 -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 #3372** (`feat/upgrade-datapack-2b`): 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 4 of 5 of `horizon-port-pack upgrade-datapack` (26.2 data packs in 26.3's formats; part 1 has the command and the background): - **features**: configured features move to `feature/` with `config` unwrapped. Block state providers take their 26.3 names (`weighted_state_provider` becomes `weighted`, and so on; a `simple_state_provider` is just its state). Nested and inline placed features are upgraded with them. Feature types that 26.3 replaced with compositions of other features (`seagrass`, `kelp`, `basalt_columns`, `random_patch` and others) are listed in the report as left as they are: the upgrade does not write vanilla's compositions; - **placement**: `random_offset` (`xz_spread`, `y_spread`) becomes `offset` with one provider per axis, x and z both from `xz_spread`. The feature conversion holds no state, so it is free functions in `upgrade/features.rs`. ## Vanilla reference 26.2's `ConfiguredFeature` codec (type + `config`), its block state provider types, and `RandomOffsetPlacement`, against 26.3's `feature` codec, providers and `OffsetPlacement`. A unit test covers the config unwrap, the provider rename and the offset. `tools/datapack_upgrade_rosetta.py` (part 5) compares vanilla 26.2's own features, upgraded, with 26.3's. Tooling: no harness. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at e1b2b0b2f, 3 min 3 s) | Check | Result | | --- | --- | | Scope | ⚠️ 9 files, +1587 −3; 1590 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) (1 min 48 s) | | rustfmt | ✅ (15 s) | | clippy | ✅ (3 s) | | tests: horizon-port-pack | ✅ 76 passed (6 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ❌ failed (18 s) | | launcher tests | ✅ 212 passed (27 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:04 +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#4940
No description provided.