[PR #2414] [MERGED] Send the sign editor's text like vanilla #4293

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

📋 Pull Request Information

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

Base: main ← Head: fix/sign-editor-update


📝 Commits (2)

  • 2b2aecd fix(client): send sign editor text like vanilla
  • 03d8ffe Sign editor: send the lines as edited, sign or not

📊 Changes

3 files changed (+34 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+9 -0)
📝 crates/horizon-client/src/game/sign_edit.rs (+21 -9)
📝 crates/horizon-client/src/signs.rs (+4 -4)

📄 Description

🤖 Opened by mahirsn's AI agent (Claude Code), not by mahirsn.

What and why

On a server, Horizon sent no ServerboundSignUpdatePacket in two cases where vanilla does:

  • a second ClientboundOpenSignEditorPacket while an editor is open: vanilla's setScreen removes the old editor, which sends its text; Horizon replaced it silently;
  • the sign is removed while its editor is open: vanilla's editor closes on its next tick and sends the lines it opened with; Horizon kept the editor and, once the block entity was gone, sent nothing.

Sign text also kept only text components: key bind and translatable components became empty lines. Vanilla's Component.getString resolves them (an unknown key bind or translation key stays as the key).

Servers use exactly this to check clients (a burst of sign editors on temporary signs, then compare the answers), so Horizon was kicked as a modded client.

Vanilla reference

  • Minecraft.setScreen → AbstractSignEditScreen.removed: ServerboundSignUpdatePacket(pos, messages, slot).
  • AbstractSignEditScreen.tick / isValid: onDone once SignBlockEntity.isRemoved().
  • AbstractSignEditScreen.<init>: messages from SignText.getMessages(filtered) as plain strings (Component.getString).

Checked against a vanilla 26.3 dedicated server with a packet log that opens the editor on two signs holding keybind/translate components, then removes both. Before: no sign_update (0/2 runs). After: two sign_updates with key.killaura, xray.config.toggle, plain, ... (3/3 runs).

#2225 also touches sign_edit.rs (editing by right click); this one only changes how an editor closes and what it sends.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on marc, against upstream/main at 7674ef77c, 2 min 8 s)

Check Result
Scope ✅ 3 files, +34 −12
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (4 s)
clippy ✅ (41 s)
tests: horizon-client ✅ 1335 passed (1 min 20 s)
doc tests ✅ 0 passed (3 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)

🔄 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/2414 **Author:** [@mahirsn](https://github.com/mahirsn) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sign-editor-update` --- ### 📝 Commits (2) - [`2b2aecd`](https://github.com/horizon-rust/horizon/commit/2b2aecd9757305af6e124daeaf55b5327440c02e) fix(client): send sign editor text like vanilla - [`03d8ffe`](https://github.com/horizon-rust/horizon/commit/03d8ffe2c6f6cd7f379485900e4d818b7db0ce5a) Sign editor: send the lines as edited, sign or not ### 📊 Changes **3 files changed** (+34 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+9 -0) 📝 `crates/horizon-client/src/game/sign_edit.rs` (+21 -9) 📝 `crates/horizon-client/src/signs.rs` (+4 -4) </details> ### 📄 Description > 🤖 Opened by mahirsn's AI agent (Claude Code), not by mahirsn. ## What and why On a server, Horizon sent no `ServerboundSignUpdatePacket` in two cases where vanilla does: - a second `ClientboundOpenSignEditorPacket` while an editor is open: vanilla's `setScreen` removes the old editor, which sends its text; Horizon replaced it silently; - the sign is removed while its editor is open: vanilla's editor closes on its next tick and sends the lines it opened with; Horizon kept the editor and, once the block entity was gone, sent nothing. Sign text also kept only `text` components: key bind and translatable components became empty lines. Vanilla's `Component.getString` resolves them (an unknown key bind or translation key stays as the key). Servers use exactly this to check clients (a burst of sign editors on temporary signs, then compare the answers), so Horizon was kicked as a modded client. ## Vanilla reference - `Minecraft.setScreen` → `AbstractSignEditScreen.removed`: `ServerboundSignUpdatePacket(pos, messages, slot)`. - `AbstractSignEditScreen.tick` / `isValid`: `onDone` once `SignBlockEntity.isRemoved()`. - `AbstractSignEditScreen.<init>`: `messages` from `SignText.getMessages(filtered)` as plain strings (`Component.getString`). Checked against a vanilla 26.3 dedicated server with a packet log that opens the editor on two signs holding `keybind`/`translate` components, then removes both. Before: no `sign_update` (0/2 runs). After: two `sign_update`s with `key.killaura`, `xray.config.toggle`, `plain`, ... (3/3 runs). #2225 also touches `sign_edit.rs` (editing by right click); this one only changes how an editor closes and what it sends. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on marc, against upstream/main at 7674ef77c, 2 min 8 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +34 −12 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (4 s) | | clippy | ✅ (41 s) | | tests: horizon-client | ✅ 1335 passed (1 min 20 s) | | doc tests | ✅ 0 passed (3 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) | --- <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:07 +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#4293
No description provided.