[PR #5229] [MERGED] Title a player head after its profile #6152

Closed
opened 2026-11-03 06:14:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5229
Author: @MSedgeMC
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/player-head-name


📝 Commits (1)

  • 5a4e559 Title a player head after its profile

📊 Changes

4 files changed (+71 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+2 -0)
📝 crates/horizon-client/src/game/stations.rs (+2 -0)
📝 crates/horizon-client/src/item_tooltip.rs (+62 -0)
📝 crates/horizon-items/src/item_data.rs (+5 -0)

📄 Description

Fixes the PlayerHeadItem.getName row in the port ledger. (No issue.)

A player head whose minecraft:profile names someone is titled %s's Head — block.minecraft.player_head.named — in its tooltip and in command feedback. Horizon always showed the plain Player Head, in both the tooltip's name line and /give's feedback, while the profile component was already decoded alongside the other unmodelled components.

One small helper reads the profile's name (a bare string or the compound's name field), and both name-resolution paths use it: the tooltip line and the command feedback, the latter as a translatable component rather than a built English string. An id-only profile keeps the plain name, and a custom name still wins.

Proven: the new test passes on a build box — a bare profile and a compound profile both read Notch's Head, an id-only profile reads Player Head, and a custom-named head keeps its own name. Not proven: nothing in a game; the command-feedback path itself is not unit-tested because it needs a Game.


🔄 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/5229 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/player-head-name` --- ### 📝 Commits (1) - [`5a4e559`](https://github.com/horizon-rust/horizon/commit/5a4e55917e82185c5869dc8eeb2c029dfdc7b5d0) Title a player head after its profile ### 📊 Changes **4 files changed** (+71 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+2 -0) 📝 `crates/horizon-client/src/game/stations.rs` (+2 -0) 📝 `crates/horizon-client/src/item_tooltip.rs` (+62 -0) 📝 `crates/horizon-items/src/item_data.rs` (+5 -0) </details> ### 📄 Description Fixes the `PlayerHeadItem.getName` row in the port ledger. (No issue.) A player head whose `minecraft:profile` names someone is titled `%s's Head` — `block.minecraft.player_head.named` — in its tooltip and in command feedback. Horizon always showed the plain `Player Head`, in both the tooltip's name line and `/give`'s feedback, while the profile component was already decoded alongside the other unmodelled components. One small helper reads the profile's name (a bare string or the compound's `name` field), and both name-resolution paths use it: the tooltip line and the command feedback, the latter as a translatable component rather than a built English string. An id-only profile keeps the plain name, and a custom name still wins. **Proven:** the new test passes on a build box — a bare profile and a compound profile both read `Notch's Head`, an id-only profile reads `Player Head`, and a custom-named head keeps its own name. **Not proven:** nothing in a game; the command-feedback path itself is not unit-tested because it needs a `Game`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:14:59 +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#6152
No description provided.