[PR #1718] [MERGED] Client: model text-display metadata against the Java wire codec #3710

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1718
Author: @RVZO6
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: feature/text-display-state


📝 Commits (2)

  • dc1e16f Model every text-display metadata field against the Java wire codec
  • 76408b7 Text displays: an Align enum, and the text shared rather than copied

📊 Changes

6 files changed (+287 additions, -0 deletions)

View changed files

📝 crates/horizon-client/examples/probe/main.rs (+2 -0)
➕ crates/horizon-client/examples/probe/text_display_fixture.rs (+28 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
➕ crates/horizon-client/src/text_display.rs (+124 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTextDisplayOracle.java (+76 -0)
➕ tools/test_text_display_parity.py (+56 -0)

📄 Description

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

What and why

First part of text-display client support: model Display/TextDisplay metadata without guessing its wire layout. A separate renderer change consumes this model.

The model retains every common display/text property, styled text, and fields omitted from partial updates. The oracle creates the real vanilla TextDisplay, reads its actual default values/accessors, and encodes ClientboundSetEntityDataPacket with vanilla's stream codec. Rust must consume the packet and produce the same state.

Vanilla reference and checks

  • Pinned 26.3 Display.defineSynchedData and TextDisplay.defineSynchedData, getAlign, and ClientboundSetEntityDataPacket.STREAM_CODEC.
  • tools/test_text_display_parity.py: 513 native Java/Rust cases passed (every flag combination, four opacity boundaries and four billboard modes, transforms, brightness and Unicode text).
  • Partial-update/malformed-vector unit test passed; formatting and client build check passed.
  • Game jars, resources and generated fixture outputs remain local. This PR alone does not draw displays.

🤖 Generated with OpenAI 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/1718 **Author:** [@RVZO6](https://github.com/RVZO6) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feature/text-display-state` --- ### 📝 Commits (2) - [`dc1e16f`](https://github.com/horizon-rust/horizon/commit/dc1e16f4729f7439527c70eee211ab413e6cf150) Model every text-display metadata field against the Java wire codec - [`76408b7`](https://github.com/horizon-rust/horizon/commit/76408b734e082ee149e558e1e2ee8a1114cef742) Text displays: an Align enum, and the text shared rather than copied ### 📊 Changes **6 files changed** (+287 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/main.rs` (+2 -0) ➕ `crates/horizon-client/examples/probe/text_display_fixture.rs` (+28 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) ➕ `crates/horizon-client/src/text_display.rs` (+124 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTextDisplayOracle.java` (+76 -0) ➕ `tools/test_text_display_parity.py` (+56 -0) </details> ### 📄 Description > 🤖 Opened by RVZO6's AI agent (OpenAI Codex, gpt-6.1-sol), not by RVZO6. ## What and why First part of text-display client support: model Display/TextDisplay metadata without guessing its wire layout. A separate renderer change consumes this model. The model retains every common display/text property, styled text, and fields omitted from partial updates. The oracle creates the real vanilla TextDisplay, reads its actual default values/accessors, and encodes ClientboundSetEntityDataPacket with vanilla's stream codec. Rust must consume the packet and produce the same state. ## Vanilla reference and checks - Pinned 26.3 Display.defineSynchedData and TextDisplay.defineSynchedData, getAlign, and ClientboundSetEntityDataPacket.STREAM_CODEC. - `tools/test_text_display_parity.py`: 513 native Java/Rust cases passed (every flag combination, four opacity boundaries and four billboard modes, transforms, brightness and Unicode text). - Partial-update/malformed-vector unit test passed; formatting and client build check passed. - Game jars, resources and generated fixture outputs remain local. This PR alone does not draw displays. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:36 +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#3710
No description provided.