[PR #1080] [CLOSED] fix(client): Load server player skins and armor stand hologram names #3029

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1080
Author: @ItsPotatoTime
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: fix/skins


📝 Commits (2)

  • ded9af6 fix(client): show server players' and NPCs' skins
  • f4e6e2b fix(client): draw armor stand custom names as name tags

📊 Changes

12 files changed (+274 additions, -33 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+6 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+51 -0)
📝 crates/horizon-client/src/game.rs (+4 -3)
📝 crates/horizon-client/src/game/armor_stands.rs (+7 -1)
📝 crates/horizon-client/src/game/item_draw.rs (+18 -1)
📝 crates/horizon-client/src/game/names.rs (+58 -0)
📝 crates/horizon-client/src/game/remote.rs (+76 -27)
📝 crates/horizon-client/src/game/remote_objects.rs (+8 -0)
📝 crates/horizon-client/src/game/scoreboard.rs (+5 -0)
📝 crates/horizon-client/src/mobs.rs (+4 -0)
📝 crates/horizon-client/src/mobs/render.rs (+4 -1)
📝 crates/horizon-client/src/skins.rs (+33 -0)

📄 Description

Summary

Server worlds drew every player and NPC with the default Steve or Alex skin. The tab list resolved skins only for the players in the player list, and the level's player models never received the resolved texture. The fix routes PlayerInfo.getSkin to every player entity and to the local player's own model. Player heads read the minecraft:profile component with SkinManager.getInsecureSkinInformation, so unsigned textures from offline-mode servers render the way vanilla draws them.

Armor stand holograms drew nothing. Server holograms are invisible armor stands carrying CustomName and CustomNameVisible; Horizon parsed neither field and built name tags only from mobs. Both fields now load from NBT and entity data, and armor stands take part in the name tag pass at their bounding-box height even when their model is skipped.

Changes

  • Mob carries an optional skin location, and mobs::render::body uses it in place of the type's default texture for player models.
  • Game::update_remote_skins resolves every entry in skin_textures with the existing PlayerInfo.createSkinLookup rule (requireSecure = !isLocalPlayer), applies the result to level_players entities that are minecraft:player mobs, and sets the local player's own model.
  • remote_tab_players uses the resolved map and no longer resolves skins itself.
  • Ready skin downloads are drained in draw_tab_list, which runs every HUD frame, so both the player-list heads and world bodies see them.
  • skins::profile_skin_url reads a minecraft:profile component's unsigned textures property; item_draw::Host implements SpecialHost::player_skin with it.
  • The worn-skull branch of the armor stand renderer passes the stack's minecraft:profile component to submit_special.
  • ArmorStand gains custom_name and name_visible; entity_nbt reads and writes them, and remote_objects applies entity data indices 2 and 3.
  • Game::name_tags includes armor stands: a CustomNameVisible name draws at height + 0.5, with marker stands at height 0, small stands at 0.9875 and normal stands at 1.975.

Test plan

Ran in this checkout with stable 1.97.1:

  • cargo fmt --all -- --check
  • cargo test --workspace --exclude horizon-mods
  • python tools/check_public_tree.py
  • python tools/check_public_tree.py --history
  • python -m unittest discover -s tests

cargo test --workspace cannot finish here because the horizon-mods sandbox tests need the wasm32-unknown-unknown target, which this checkout does not have and CI installs.

cargo clippy --workspace --all-targets -- -D warnings reports two lints in files this change does not touch with the local 1.97.1 clippy: boxed_local in streaming.rs and manual_range_contains in horizon-world. With those two allowed, the workspace and the client server build pass:

  • cargo clippy --workspace --all-targets -- -D warnings -A clippy::manual_range_contains -A clippy::boxed_local
  • cargo clippy -p horizon-client --all-targets --no-default-features -- -D warnings -A clippy::manual_range_contains -A clippy::boxed_local

Manual check in an offscreen client (LegacyTest, creative):

  • summon minecraft:armor_stand 0.5 64 3.5 {Invisible:1b,NoGravity:1b,CustomName:{text:"Gold hologram",color:"gold",bold:true},CustomNameVisible:1b}
  • status listed Gold hologram under name_tags, and the frame showed the gold name tag in the world with no stand model drawn.
  • The new unit test armor_stand_names_keep_their_formatting_across_a_save covers a string name with legacy codes and a compound component across a save and load.
  • profile_components_supply_unsigned_head_skins covers the profile component's unsigned texture URL.

Skin assignment was not exercised against a live offline-mode server here. It keeps the secure/unsigned split PlayerInfo.createSkinLookup already had.

Generated with Cairn Code · deepseek-v4.1-flash


🔄 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/1080 **Author:** [@ItsPotatoTime](https://github.com/ItsPotatoTime) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/skins` --- ### 📝 Commits (2) - [`ded9af6`](https://github.com/horizon-rust/horizon/commit/ded9af623832b03c1276b82f54bd59f03afd0eca) fix(client): show server players' and NPCs' skins - [`f4e6e2b`](https://github.com/horizon-rust/horizon/commit/f4e6e2bbb865166503e6b8ef73d2335c20c829cd) fix(client): draw armor stand custom names as name tags ### 📊 Changes **12 files changed** (+274 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+6 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+51 -0) 📝 `crates/horizon-client/src/game.rs` (+4 -3) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+7 -1) 📝 `crates/horizon-client/src/game/item_draw.rs` (+18 -1) 📝 `crates/horizon-client/src/game/names.rs` (+58 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+76 -27) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+8 -0) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs.rs` (+4 -0) 📝 `crates/horizon-client/src/mobs/render.rs` (+4 -1) 📝 `crates/horizon-client/src/skins.rs` (+33 -0) </details> ### 📄 Description ## Summary Server worlds drew every player and NPC with the default Steve or Alex skin. The tab list resolved skins only for the players in the player list, and the level's player models never received the resolved texture. The fix routes `PlayerInfo.getSkin` to every player entity and to the local player's own model. Player heads read the `minecraft:profile` component with `SkinManager.getInsecureSkinInformation`, so unsigned textures from offline-mode servers render the way vanilla draws them. Armor stand holograms drew nothing. Server holograms are invisible armor stands carrying `CustomName` and `CustomNameVisible`; Horizon parsed neither field and built name tags only from mobs. Both fields now load from NBT and entity data, and armor stands take part in the name tag pass at their bounding-box height even when their model is skipped. ## Changes - `Mob` carries an optional `skin` location, and `mobs::render::body` uses it in place of the type's default texture for player models. - `Game::update_remote_skins` resolves every entry in `skin_textures` with the existing `PlayerInfo.createSkinLookup` rule (`requireSecure = !isLocalPlayer`), applies the result to `level_players` entities that are `minecraft:player` mobs, and sets the local player's own model. - `remote_tab_players` uses the resolved map and no longer resolves skins itself. - Ready skin downloads are drained in `draw_tab_list`, which runs every HUD frame, so both the player-list heads and world bodies see them. - `skins::profile_skin_url` reads a `minecraft:profile` component's unsigned `textures` property; `item_draw::Host` implements `SpecialHost::player_skin` with it. - The worn-skull branch of the armor stand renderer passes the stack's `minecraft:profile` component to `submit_special`. - `ArmorStand` gains `custom_name` and `name_visible`; `entity_nbt` reads and writes them, and `remote_objects` applies entity data indices 2 and 3. - `Game::name_tags` includes armor stands: a `CustomNameVisible` name draws at `height + 0.5`, with marker stands at height 0, small stands at 0.9875 and normal stands at 1.975. ## Test plan Ran in this checkout with stable 1.97.1: - `cargo fmt --all -- --check` - `cargo test --workspace --exclude horizon-mods` - `python tools/check_public_tree.py` - `python tools/check_public_tree.py --history` - `python -m unittest discover -s tests` `cargo test --workspace` cannot finish here because the `horizon-mods` sandbox tests need the `wasm32-unknown-unknown` target, which this checkout does not have and CI installs. `cargo clippy --workspace --all-targets -- -D warnings` reports two lints in files this change does not touch with the local 1.97.1 clippy: `boxed_local` in `streaming.rs` and `manual_range_contains` in `horizon-world`. With those two allowed, the workspace and the client server build pass: - `cargo clippy --workspace --all-targets -- -D warnings -A clippy::manual_range_contains -A clippy::boxed_local` - `cargo clippy -p horizon-client --all-targets --no-default-features -- -D warnings -A clippy::manual_range_contains -A clippy::boxed_local` Manual check in an offscreen client (`LegacyTest`, creative): - `summon minecraft:armor_stand 0.5 64 3.5 {Invisible:1b,NoGravity:1b,CustomName:{text:"Gold hologram",color:"gold",bold:true},CustomNameVisible:1b}` - `status` listed `Gold hologram` under `name_tags`, and the frame showed the gold name tag in the world with no stand model drawn. - The new unit test `armor_stand_names_keep_their_formatting_across_a_save` covers a string name with legacy codes and a compound component across a save and load. - `profile_components_supply_unsigned_head_skins` covers the profile component's unsigned texture URL. Skin assignment was not exercised against a live offline-mode server here. It keeps the secure/unsigned split `PlayerInfo.createSkinLookup` already had. Generated with Cairn Code · deepseek-v4.1-flash --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:55 +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#3029
No description provided.