[PR #3802] [MERGED] Data packs: a pack's block state providers join the state_providers bundle #5226

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

📋 Pull Request Information

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

Base: main ← Head: fix/datapack-block-state-providers


📝 Commits (1)

  • c9999e3 Worldgen: data packs' block state providers join the state_providers bundle

📊 Changes

1 file changed (+10 additions, -1 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/overrides.rs (+10 -1)

📄 Description

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

Follow-up to #3476, which merged before this fix landed on it. AdachiReiYay's agent found the problem while testing the series with real packs (their comment on #3476).

overrides::KINDS had no worldgen/block_state_provider entry, so a pack's own block state providers never reached the state_providers bundle. GeneratorData::load_with already reads that bundle through read_optional_bundle. Every placed feature that used one was skipped. With William Wythers' Overhauled Overworld 3.0.1 (wwoo_main), the log says worldgen/block_state_provider: 4 files the generator does not read and 7 placed features cannot run, and the pack's stony cliffs come out as dirt.

This PR adds the one KINDS line (14 → 15 entries). pack_files_go_to_their_bundles now routes a provider file and reads it back from state_providers.

Evidence (AdachiReiYay's run with this exact line: seed 1234, three 9×9-chunk areas, blocks differing from vanilla 26.3):

Area Without With Vanilla vs vanilla
(-33,3) 27,354 6,877 4,304
(154,3) 26,088 7,609 14,796
(-221,191) 54 54 728
All three 0.371% 0.101% 0.137%

Checked here (Windows, on upstream main 64e298952): cargo fmt --all -- --check, cargo clippy -p horizon-world --all-targets --locked -- -D warnings, and the horizon-world tests (192 passed). Worlds without packs are unaffected: the change only routes files under data/<ns>/worldgen/block_state_provider/.

Not in this PR: tags/worldgen/feature (can_spawn_from_bone_meal). It only affects bone meal, and it needs the tag merge that TAG_KINDS gets rather than a KINDS line, so it belongs in a separate follow-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/3802 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/datapack-block-state-providers` --- ### 📝 Commits (1) - [`c9999e3`](https://github.com/horizon-rust/horizon/commit/c9999e333647c6516f1ab734f5581dcd36617221) Worldgen: data packs' block state providers join the state_providers bundle ### 📊 Changes **1 file changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/overrides.rs` (+10 -1) </details> ### 📄 Description Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie. Follow-up to #3476, which merged before this fix landed on it. AdachiReiYay's agent found the problem while testing the series with real packs ([their comment on #3476](https://github.com/horizon-rust/horizon/pull/3476#issuecomment-6500714049)). `overrides::KINDS` had no `worldgen/block_state_provider` entry, so a pack's own block state providers never reached the `state_providers` bundle. `GeneratorData::load_with` already reads that bundle through `read_optional_bundle`. Every placed feature that used one was skipped. With William Wythers' Overhauled Overworld 3.0.1 (`wwoo_main`), the log says `worldgen/block_state_provider: 4 files the generator does not read` and `7 placed features cannot run`, and the pack's stony cliffs come out as dirt. This PR adds the one `KINDS` line (14 → 15 entries). `pack_files_go_to_their_bundles` now routes a provider file and reads it back from `state_providers`. **Evidence** (AdachiReiYay's run with this exact line: seed 1234, three 9×9-chunk areas, blocks differing from vanilla 26.3): | Area | Without | With | Vanilla vs vanilla | |---|---|---|---| | (-33,3) | 27,354 | 6,877 | 4,304 | | (154,3) | 26,088 | 7,609 | 14,796 | | (-221,191) | 54 | 54 | 728 | | All three | 0.371% | 0.101% | 0.137% | **Checked here** (Windows, on upstream main 64e298952): `cargo fmt --all -- --check`, `cargo clippy -p horizon-world --all-targets --locked -- -D warnings`, and the horizon-world tests (192 passed). Worlds without packs are unaffected: the change only routes files under `data/<ns>/worldgen/block_state_provider/`. Not in this PR: `tags/worldgen/feature` (`can_spawn_from_bone_meal`). It only affects bone meal, and it needs the tag merge that `TAG_KINDS` gets rather than a `KINDS` line, so it belongs in a separate follow-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:11:06 +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#5226
No description provided.