[PR #2450] [MERGED] Structures: a chunk saves its starts also when no piece reaches it #4326

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2450
Author: @FusselTV
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/structure-starts-split


📝 Commits (1)

  • 61df807 Structures: a chunk saves its starts also when no piece reaches it

📊 Changes

1 file changed (+36 additions, -13 deletions)

View changed files

📝 crates/horizon-world/src/worldgen/generator.rs (+36 -13)

📄 Description

🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally.

What and why

Follow-up to #2078. A chunk's STRUCTURE_STARTS are the starts made in it (StructureManager.getAllStarts), whether or not one of their pieces reaches it. own_starts filtered the chunk's references, which only hold starts with a piece in that chunk. So a start whose pieces all lie next door was not saved. Example: seed 8675309's giant ruined portal starts in chunk (-26, 23) and lies wholly in (-26, 24).

What changes:

  • The proto chunk keeps the starts made at its position (starts_at) and saves those.

Vanilla reference

  • ChunkSerializer.packStructureData: writes getAllStarts().
  • StructureManager.setStartForStructure / ChunkStatusTasks.generateStructureStarts: the start goes to the chunk it was made in.

Tests

  • New unit test generator::tests::a_chunk_holds_its_starts_whose_pieces_lie_elsewhere (seed 8675309, chunk -26, 23).
  • tools/test_structure_start_nbt_parity.py: 34 of 34 structure starts save as vanilla.
  • End to end over seeds 12345, 1 and 8675309, 1,024 × 1,024 blocks: the giant ruined portal start is now saved. The structure starts that still differ (mineshaft and fortress flags in chunks at the edge of the area, one ocean ruin) differ the same way in Paper or in a second vanilla run.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on 3c084e43ceb0, against upstream/main at 68db8847e, 2 min 0 s)

Check Result
Scope ✅ 1 files, +36 −13
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (6 s)
clippy ✅ (20 s)
tests: horizon-world ✅ 243 passed (1 min 31 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, attribute_updates, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim and 320 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/2450 **Author:** [@FusselTV](https://github.com/FusselTV) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/structure-starts-split` --- ### 📝 Commits (1) - [`61df807`](https://github.com/horizon-rust/horizon/commit/61df807b33290aa01e0bebb928ea7449252213df) Structures: a chunk saves its starts also when no piece reaches it ### 📊 Changes **1 file changed** (+36 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/generator.rs` (+36 -13) </details> ### 📄 Description > 🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally. ## What and why Follow-up to #2078. A chunk's `STRUCTURE_STARTS` are the starts made in it (`StructureManager.getAllStarts`), whether or not one of their pieces reaches it. `own_starts` filtered the chunk's references, which only hold starts with a piece in that chunk. So a start whose pieces all lie next door was not saved. Example: seed 8675309's giant ruined portal starts in chunk (-26, 23) and lies wholly in (-26, 24). What changes: - The proto chunk keeps the starts made at its position (`starts_at`) and saves those. ## Vanilla reference - `ChunkSerializer.packStructureData`: writes `getAllStarts()`. - `StructureManager.setStartForStructure` / `ChunkStatusTasks.generateStructureStarts`: the start goes to the chunk it was made in. ## Tests - New unit test `generator::tests::a_chunk_holds_its_starts_whose_pieces_lie_elsewhere` (seed 8675309, chunk -26, 23). - `tools/test_structure_start_nbt_parity.py`: 34 of 34 structure starts save as vanilla. - End to end over seeds 12345, 1 and 8675309, 1,024 × 1,024 blocks: the giant ruined portal start is now saved. The structure starts that still differ (mineshaft and fortress flags in chunks at the edge of the area, one ocean ruin) differ the same way in Paper or in a second vanilla run. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on 3c084e43ceb0, against upstream/main at 68db8847e, 2 min 0 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +36 −13 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (6 s) | | clippy | ✅ (20 s) | | tests: horizon-world | ✅ 243 passed (1 min 31 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, attribute_updates, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim and 320 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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 04:16:22 +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#4326
No description provided.