[PR #3327] [MERGED] Client: render player heads and sprites in text components #4904

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3327
Author: @damnurmum
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: fix/inline-object-text


📝 Commits (5)

  • dd130f1 Render player heads and atlas sprites in text components
  • 1eb34fa Merge main into this branch
  • a20aaf5 Text objects: vanilla's default fallback when none is given
  • a5a0e1b Merge main into inline object text
  • 5a1c095 Merge main into this branch

📊 Changes

6 files changed (+367 additions, -20 deletions)

View changed files

📝 crates/horizon-client-core/src/component.rs (+106 -2)
📝 crates/horizon-client-core/src/text.rs (+31 -1)
📝 crates/horizon-client-render/src/font.rs (+3 -0)
📝 crates/horizon-client-render/src/hud.rs (+188 -16)
📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+38 -1)

📄 Description

🤖 Opened by contributor damnurmum's AI agent (OpenAI Codex), not by the contributor personally.

Summary

Render minecraft:object text components in the client: player heads from player profiles and 8×8 atlas sprites such as item/porkchop. Keep the component's fallback for plain-text output, preserve object-only Tab headers and footers, and resolve profile skins through the existing client skin cache.

This is separate from #1702, which changes styled custom item names and tooltips. It also contains no protocol bridge, color, or shadow changes.

Verification

Synthetic resource tests cover a player head and an item sprite in styled text. Parsing tests cover fallback text, siblings, and component round trips. The contributor also observed heads and item icons in text on a 26.2 server through a separate protocol bridge branch; this PR targets Horizon's current 26.3 client.

pr_ready (tools/pr_ready.py --quick on MacBook-Air-Pavel, against origin/main at ed7213df2, 2 min 45 s)

Check Result
Scope ✅ 6 files, +323 −18
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 402 passed (28 s)
rustfmt ✅ (4 s)
clippy ✅ (54 s)
tests: horizon-client, horizon-client-core ✅ 1317 passed (1 min 2 s)
doc tests ✅ 0 passed (16 s)
content root tests ➖ content root untouched
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 current HUD packs sprite paths into one texture. The atlas field is retained in the parsed component, but distinct sprite IDs from different custom atlases are not yet disambiguated by this renderer. The default minecraft:blocks item sprites used in the reported case are covered by the test.

Reference: Minecraft Java 1.21.9 object text component specification and 26.1 fallback addition.

🤖 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/3327 **Author:** [@damnurmum](https://github.com/damnurmum) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/inline-object-text` --- ### 📝 Commits (5) - [`dd130f1`](https://github.com/horizon-rust/horizon/commit/dd130f19022f364f93f72ecee7d58159d6f91177) Render player heads and atlas sprites in text components - [`1eb34fa`](https://github.com/horizon-rust/horizon/commit/1eb34fa68e16319aeca1de696c57d8440a283c3d) Merge main into this branch - [`a20aaf5`](https://github.com/horizon-rust/horizon/commit/a20aaf5396fd45342796a1bb61ad041cf8796cf8) Text objects: vanilla's default fallback when none is given - [`a5a0e1b`](https://github.com/horizon-rust/horizon/commit/a5a0e1bb988cb09e0ed354bf80dcb665857aa270) Merge main into inline object text - [`5a1c095`](https://github.com/horizon-rust/horizon/commit/5a1c095724048b869e725b2f369ae5ff0bd409b6) Merge main into this branch ### 📊 Changes **6 files changed** (+367 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/component.rs` (+106 -2) 📝 `crates/horizon-client-core/src/text.rs` (+31 -1) 📝 `crates/horizon-client-render/src/font.rs` (+3 -0) 📝 `crates/horizon-client-render/src/hud.rs` (+188 -16) 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+38 -1) </details> ### 📄 Description > 🤖 Opened by contributor damnurmum's AI agent (OpenAI Codex), not by the contributor personally. ## Summary Render `minecraft:object` text components in the client: player heads from `player` profiles and 8×8 atlas sprites such as `item/porkchop`. Keep the component's `fallback` for plain-text output, preserve object-only Tab headers and footers, and resolve profile skins through the existing client skin cache. This is separate from #1702, which changes styled custom item names and tooltips. It also contains no protocol bridge, color, or shadow changes. ## Verification Synthetic resource tests cover a player head and an item sprite in styled text. Parsing tests cover fallback text, siblings, and component round trips. The contributor also observed heads and item icons in text on a 26.2 server through a separate protocol bridge branch; this PR targets Horizon's current 26.3 client. **pr_ready** (`tools/pr_ready.py --quick` on MacBook-Air-Pavel, against origin/main at ed7213df2, 2 min 45 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +323 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 402 passed (28 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (54 s) | | tests: horizon-client, horizon-client-core | ✅ 1317 passed (1 min 2 s) | | doc tests | ✅ 0 passed (16 s) | | content root tests | ➖ content root untouched | | 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 current HUD packs sprite paths into one texture. The `atlas` field is retained in the parsed component, but distinct sprite IDs from different custom atlases are not yet disambiguated by this renderer. The default `minecraft:blocks` item sprites used in the reported case are covered by the test. Reference: [Minecraft Java 1.21.9 object text component specification](https://www.minecraft.net/en-us/article/minecraft-java-edition-1-21-9) and [26.1 fallback addition](https://www.minecraft.net/en-us/article/minecraft-java-edition-26-1). 🤖 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 05:08:46 +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#4904
No description provided.