[PR #4704] [MERGED] Structure block: StructureBlockEditScreen #5793

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4704
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/A1c-structure-screen


📝 Commits (2)

  • c739b7a StructureBlockEditScreen
  • 49db9b2 Merge remote-tracking branch 'hr/main' into parity/A1c-structure-screen

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game.rs (+14 -0)
📝 crates/horizon-client/src/game/agent.rs (+1 -0)
➕ crates/horizon-client/src/game/block_editor.rs (+468 -0)
📝 crates/horizon-client/src/game/control.rs (+7 -1)
📝 crates/horizon-client/src/game/debug_keys.rs (+5 -1)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)
📝 crates/horizon-client/src/game/screens.rs (+3 -1)
➕ crates/horizon-client/src/game/structure_edit.rs (+507 -0)

📄 Description

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

Part of #3518 (stage 1c of the structure/jigsaw/test block project: StructureBlockEditScreen).

What and why

Using a structure block as a game master did nothing on the client. Vanilla opens the editor client-side (LocalPlayer.openStructureBlock) once the server answers Success; Horizon's world crate already reports the open effect, so the window now opens the editor itself.

  • StructureBlockEditScreen: vanilla layout, button ids and lang keys (name, position, size, integrity, seed, mode cycle, mirror/rotation, ignore entities, show air, show bounding box, detect, save/load, done/cancel), integrity formatting, name character filter, Esc reverts, Enter/Tab, and the ServerboundSetStructureBlockPacket built by each button.
  • A small generic Screen::BlockEditor runner (game/block_editor.rs) with an Editor trait, so the jigsaw, test block and test instance block screens only add an editor and a match arm. Wired into drawing, input, horizon-ctl/agent screen names and the debug keys.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

StructureBlockEditScreen.init/updateMode/updateDirectionButtons/sendToServer/onDone/onCancel, LocalPlayer.openStructureBlock, StructureBlock.useWithoutItem.

Tests

game::block_editor and game::structure_edit tests (packet building per button, integrity formatting, name filter, cycle formula). fmt and clippy -D warnings clean on horizon-client.

🤖 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/4704 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/A1c-structure-screen` --- ### 📝 Commits (2) - [`c739b7a`](https://github.com/horizon-rust/horizon/commit/c739b7af732f7dc060ba6ea4aae6f16a22995d7b) StructureBlockEditScreen - [`49db9b2`](https://github.com/horizon-rust/horizon/commit/49db9b276bb7e5b44edd15ddf0a6fae30dea44f6) Merge remote-tracking branch 'hr/main' into parity/A1c-structure-screen ### 📊 Changes **8 files changed** (+1006 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+14 -0) 📝 `crates/horizon-client/src/game/agent.rs` (+1 -0) ➕ `crates/horizon-client/src/game/block_editor.rs` (+468 -0) 📝 `crates/horizon-client/src/game/control.rs` (+7 -1) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+5 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) 📝 `crates/horizon-client/src/game/screens.rs` (+3 -1) ➕ `crates/horizon-client/src/game/structure_edit.rs` (+507 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3518 (stage 1c of the structure/jigsaw/test block project: `StructureBlockEditScreen`). ## What and why Using a structure block as a game master did nothing on the client. Vanilla opens the editor client-side (`LocalPlayer.openStructureBlock`) once the server answers `Success`; Horizon's world crate already reports the open effect, so the window now opens the editor itself. - `StructureBlockEditScreen`: vanilla layout, button ids and lang keys (name, position, size, integrity, seed, mode cycle, mirror/rotation, ignore entities, show air, show bounding box, detect, save/load, done/cancel), integrity formatting, name character filter, Esc reverts, Enter/Tab, and the `ServerboundSetStructureBlockPacket` built by each button. - A small generic `Screen::BlockEditor` runner (`game/block_editor.rs`) with an `Editor` trait, so the jigsaw, test block and test instance block screens only add an editor and a match arm. Wired into drawing, input, `horizon-ctl`/agent screen names and the debug keys. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `StructureBlockEditScreen.init/updateMode/updateDirectionButtons/sendToServer/onDone/onCancel`, `LocalPlayer.openStructureBlock`, `StructureBlock.useWithoutItem`. ## Tests `game::block_editor` and `game::structure_edit` tests (packet building per button, integrity formatting, name filter, cycle formula). fmt and clippy `-D warnings` clean on horizon-client. 🤖 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:15:02 +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#5793
No description provided.