[PR #2313] [MERGED] Player heads and mannequins resolve name/UUID profiles; evicted skins re-upload #4196

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

📋 Pull Request Information

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

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


📝 Commits (2)

  • 7a3a196 Resolve dynamic head profiles, and re-upload evicted skins
  • 077da2e Queue the first skin upload as well as re-uploads

📊 Changes

10 files changed (+610 additions, -45 deletions)

View changed files

📝 crates/horizon-client/src/auth.rs (+1 -1)
📝 crates/horizon-client/src/block_entity_render.rs (+5 -4)
📝 crates/horizon-client/src/containers.rs (+15 -1)
📝 crates/horizon-client/src/game.rs (+4 -0)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+24 -7)
📝 crates/horizon-client/src/game/item_draw.rs (+10 -8)
📝 crates/horizon-client/src/game/remote.rs (+33 -8)
📝 crates/horizon-client/src/item_render/special.rs (+1 -1)
📝 crates/horizon-client/src/item_sync.rs (+11 -0)
📝 crates/horizon-client/src/skins.rs (+506 -15)

📄 Description

🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself.

Summary

Some servers send heads (and mannequins) whose profile carries only a player name or only a UUID — vanilla's ResolvableProfile.Dynamic, resolved through the session services (ProfileResolver.Cached). Horizon only used packed textures properties, so those heads kept the default skin, and a downloaded skin pushed out of the 128-slot atlas could never return because its decoded image was dropped.

  • skins::Resolver — profiles/getByName → session/getProfileById via the services discovery document, on background threads with ProfileResolver.Cached's bounds (256 entries, 10-minute expiry); used by skull_skin_at (placed heads), Host::player_skin (head items) and update_remote_skins (mannequins).
  • Downloader.again keeps decoded skin images (memory + the existing disk cache) so an evicted skins/<sha1> uploads again where the tab list, level players, mannequins and heads notice the missing sprite.
  • ResolvableProfile parity in parse_profile/dynamic_nbt: bare names, name-only and id-only profiles are Dynamic; properties or name+id is Static. Fallbacks follow DefaultPlayerSkin.get(partialProfile) — the name's offline UUID keys name-only profiles.
  • profile_tag keeps id, and the player-head item fallback is vanilla's slim/steve (was wide/steve).

Test plan

  • New unit tests: profiles_parse_like_resolvable_profiles, profiles_resolve_through_the_services (local services mock over HTTP), evicted_skins_upload_again
  • cargo test -p horizon-client — 1338 passed
  • In-game on a server that sends name-only head profiles (needs a live server)

pr_ready (tools/pr_ready.py --quick on MacBookPro, against origin/main at a42857ab4, 3 min 27 s)

Check Result
Scope ⚠️ 11 files, +601 −45; 646 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 1338 passed (3 min 18 s)
doc tests ✅ 0 passed (2 s)
Parity ➖ 289 affected, to run in CI (--quick)

🤖 Generated with Devin


🔄 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/2313 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/player-head-textures` --- ### 📝 Commits (2) - [`7a3a196`](https://github.com/horizon-rust/horizon/commit/7a3a19697a75e9f7bcf42da70d9f665b7937239c) Resolve dynamic head profiles, and re-upload evicted skins - [`077da2e`](https://github.com/horizon-rust/horizon/commit/077da2e06b16bcfded6224765b838c3177b45d38) Queue the first skin upload as well as re-uploads ### 📊 Changes **10 files changed** (+610 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/auth.rs` (+1 -1) 📝 `crates/horizon-client/src/block_entity_render.rs` (+5 -4) 📝 `crates/horizon-client/src/containers.rs` (+15 -1) 📝 `crates/horizon-client/src/game.rs` (+4 -0) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+24 -7) 📝 `crates/horizon-client/src/game/item_draw.rs` (+10 -8) 📝 `crates/horizon-client/src/game/remote.rs` (+33 -8) 📝 `crates/horizon-client/src/item_render/special.rs` (+1 -1) 📝 `crates/horizon-client/src/item_sync.rs` (+11 -0) 📝 `crates/horizon-client/src/skins.rs` (+506 -15) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself. ## Summary Some servers send heads (and mannequins) whose `profile` carries only a player name or only a UUID — vanilla's `ResolvableProfile.Dynamic`, resolved through the session services (`ProfileResolver.Cached`). Horizon only used packed `textures` properties, so those heads kept the default skin, and a downloaded skin pushed out of the 128-slot atlas could never return because its decoded image was dropped. - `skins::Resolver` — `profiles/getByName` → `session/getProfileById` via the services discovery document, on background threads with `ProfileResolver.Cached`'s bounds (256 entries, 10-minute expiry); used by `skull_skin_at` (placed heads), `Host::player_skin` (head items) and `update_remote_skins` (mannequins). - `Downloader.again` keeps decoded skin images (memory + the existing disk cache) so an evicted `skins/<sha1>` uploads again where the tab list, level players, mannequins and heads notice the missing sprite. - `ResolvableProfile` parity in `parse_profile`/`dynamic_nbt`: bare names, name-only and id-only profiles are `Dynamic`; `properties` or name+id is `Static`. Fallbacks follow `DefaultPlayerSkin.get(partialProfile)` — the name's offline UUID keys name-only profiles. - `profile_tag` keeps `id`, and the player-head item fallback is vanilla's `slim/steve` (was `wide/steve`). #### Test plan - [x] New unit tests: `profiles_parse_like_resolvable_profiles`, `profiles_resolve_through_the_services` (local services mock over HTTP), `evicted_skins_upload_again` - [x] `cargo test -p horizon-client` — 1338 passed - [ ] In-game on a server that sends name-only head profiles (needs a live server) **pr_ready** (`tools/pr_ready.py --quick` on MacBookPro, against origin/main at a42857ab4, 3 min 27 s) | Check | Result | | --- | --- | | Scope | ⚠️ 11 files, +601 −45; 646 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 1338 passed (3 min 18 s) | | doc tests | ✅ 0 passed (2 s) | | Parity | ➖ 289 affected, to run in CI (--quick) | 🤖 Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:23 +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#4196
No description provided.