[PR #7655] Keep manual flat placement available with structures disabled #7741

Open
opened 2026-11-03 07:23:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7655
Author: @TheMrZZ
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/h049-flat-manual-placement


📝 Commits (1)

  • d7026ac Keep manual flat placement available with structures disabled

📊 Changes

3 files changed (+184 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/game/world_loading.rs (+15 -6)
📝 crates/horizon-world/src/worldgen/generator.rs (+22 -3)
➕ tools/test_flat_place_parity.py (+147 -0)

📄 Description

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

What and why

Fixes #7611.

Manual /place jigsaw and /place structure failed in flat worlds with automatic structure generation disabled. Keep the flat command locator available while retaining the existing FlatTerrain streaming path. When automatic structure state is absent, load definitions lazily for explicit placement; automatic starts and locate searches continue to use the disabled state.

Add a live dedicated-server harness covering fresh flat worlds with generate-structures=false and true. It waits on bounded loaded-coordinate probes, checks saved automatic starts/references before placement, and compares template, jigsaw, structure, error and villager controls against Java 26.3.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Java 26.3 PlaceCommand.placeJigsaw and placeStructure, inspected from the pinned bytecode: they call JigsawPlacement.generateJigsaw and Structure.generate directly, independently of the automatic-generation flag.

tools/test_flat_place_parity.py: unchanged 97dc1b553 matches 9/12 disabled-world observations and 12/12 enabled-world controls; the fix matches 12/12 in both configurations. Both runs use fresh worlds with the same seed, and their Java observations and fixture hash are identical. Disabled worlds retain zero saved automatic structure starts and references before manual commands. This checks command support, feedback and the entity control; it makes no structure geometry or processor parity claim.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick locally, against origin/main at 97dc1b553, 16 min 37 s)

Check Result
Scope ✅ 3 files, +184 −9
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (2 min 34 s)
rustfmt ✅ (26 s)
clippy ✅ (4 min 55 s)
tests: horizon-client, horizon-world ❌ 1010 passed, 6 failed (8 min 1 s)
doc tests ✅ 0 passed (6 s)
content root tests ➖ content root untouched
mod API up to date ✅ (34 s)
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 six failing prepared-resource tests are piston tests. All six reproduce on unchanged 97dc1b553 with the same resources (cargo test -p horizon-world --lib level::tests::: 69 passed, the same six failed); an isolated run also fails on the fixed source. They are outside this placement change. The red readiness result above is retained.

The remaining world integration targets also passed separately: 88 passed, 1 ignored across 30 targets (cargo test -p horizon-world --test '*'). Cargo had stopped before these targets after the baseline unit failures.

port_ledger.py check --base origin/main reports no new gaps or stale citations. Its uncited-function advisories concern the internal definition-cache helper and the existing trait implementation. The Python suite has one skipped test; the doc suite has one ignored test.

The full affected parity suite has not been run locally (pr_ready --quick); the focused live server harness above was run separately.

🤖 Generated with Codex


🔄 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/7655 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/h049-flat-manual-placement` --- ### 📝 Commits (1) - [`d7026ac`](https://github.com/horizon-rust/horizon/commit/d7026acacc067fa877da0682227bcf0c1d0d4ed7) Keep manual flat placement available with structures disabled ### 📊 Changes **3 files changed** (+184 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/world_loading.rs` (+15 -6) 📝 `crates/horizon-world/src/worldgen/generator.rs` (+22 -3) ➕ `tools/test_flat_place_parity.py` (+147 -0) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why Fixes #7611. Manual `/place jigsaw` and `/place structure` failed in flat worlds with automatic structure generation disabled. Keep the flat command locator available while retaining the existing `FlatTerrain` streaming path. When automatic structure state is absent, load definitions lazily for explicit placement; automatic starts and locate searches continue to use the disabled state. Add a live dedicated-server harness covering fresh flat worlds with `generate-structures=false` and `true`. It waits on bounded loaded-coordinate probes, checks saved automatic starts/references before placement, and compares template, jigsaw, structure, error and villager controls against Java 26.3. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Java 26.3 `PlaceCommand.placeJigsaw` and `placeStructure`, inspected from the pinned bytecode: they call `JigsawPlacement.generateJigsaw` and `Structure.generate` directly, independently of the automatic-generation flag. `tools/test_flat_place_parity.py`: unchanged `97dc1b553` matches 9/12 disabled-world observations and 12/12 enabled-world controls; the fix matches 12/12 in both configurations. Both runs use fresh worlds with the same seed, and their Java observations and fixture hash are identical. Disabled worlds retain zero saved automatic structure starts and references before manual commands. This checks command support, feedback and the entity control; it makes no structure geometry or processor parity claim. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` locally, against origin/main at 97dc1b553, 16 min 37 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +184 −9 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (2 min 34 s) | | rustfmt | ✅ (26 s) | | clippy | ✅ (4 min 55 s) | | tests: horizon-client, horizon-world | ❌ 1010 passed, 6 failed (8 min 1 s) | | doc tests | ✅ 0 passed (6 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (34 s) | | 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 six failing prepared-resource tests are piston tests. All six reproduce on unchanged `97dc1b553` with the same resources (`cargo test -p horizon-world --lib level::tests::`: 69 passed, the same six failed); an isolated run also fails on the fixed source. They are outside this placement change. The red readiness result above is retained. The remaining world integration targets also passed separately: `88` passed, `1` ignored across `30` targets (`cargo test -p horizon-world --test '*'`). Cargo had stopped before these targets after the baseline unit failures. `port_ledger.py check --base origin/main` reports no new gaps or stale citations. Its uncited-function advisories concern the internal definition-cache helper and the existing trait implementation. The Python suite has one skipped test; the doc suite has one ignored test. The full affected parity suite has not been run locally (`pr_ready --quick`); the focused live server harness above was run separately. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7741
No description provided.