[PR #2980] [MERGED] fix(client): the first-person arm and the player models wear the player's own skin #4732

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2980
Author: @feeldev12
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/own-skin-first-person


📝 Commits (1)

  • 78c0283 fix(client): the first-person arm and the player models wear the player's own skin

📊 Changes

3 files changed (+51 additions, -14 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -4)
📝 crates/horizon-client/src/game/remote.rs (+36 -10)
📝 crates/horizon-client/src/tab_list.rs (+8 -0)

📄 Description

What and why

Fixes #2921: the first-person empty arm always drew Steve, even signed in with a Microsoft account.

  • First-person arm: it now uses the local player's skin, the same one the inventory's player model already shows, and falls back to Steve only while no skin is known.
  • Player models without a downloaded skin wear their profile's default skin (DefaultPlayerSkin.get), as the player list already does, instead of keeping whatever they had. tab_list::default_model_skin maps the default character to its wide variant, since the player model has no slim arms yet (slim arms are #2926, not part of this).
  • Single player: the integrated server is offline-mode, so its player info carries no textures and the local player had no skin there at all. When the server sends none, the signed-in account's own profile is fetched from the services through the existing skins::Resolver (Minecraft.profileFuture, MinecraftSessionService.fetchProfile), so the player model and the arm show the account's skin. Offline or without a session nothing changes.

Vanilla reference

  • PlayerRenderer.renderRightHand / renderHand: the arm is drawn with AbstractClientPlayer.getSkin().texture().
  • PlayerInfo.getSkin / createSkinLookup and DefaultPlayerSkin.get(UUID): the default skin for a profile without textures.
  • Minecraft.profileFuture (minecraftSessionService.fetchProfile(user.getProfileId(), true)): the client's own profile and textures, independent of the server.

No harness: this is skin selection for rendering; tab_list has a unit test for the default model skin.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on Windows, against upstream/main at 27c355942, 8 min 33 s)

Check Result
Scope ✅ 3 files, +51 −14
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 369 run, FAILED (failures=2, errors=7, skipped=1) (1 min 19 s)
rustfmt ✅ (10 s)
clippy ✅ (2 min 26 s)
tests: horizon-client ❌ 1133 passed, 2 failed (3 min 47 s)
doc tests ✅ 0 passed (44 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

The failures are Windows-only and unrelated to this change (no Python files touched): crash::tests::stacks_start_at_the_panicking_frame (the frame path comes out as /src/crash.rs on Windows) and save::tests::session_lock_is_exclusive (Windows byte-range lock error 33). Both fail the same way on upstream/main here.


🔄 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/2980 **Author:** [@feeldev12](https://github.com/feeldev12) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/own-skin-first-person` --- ### 📝 Commits (1) - [`78c0283`](https://github.com/horizon-rust/horizon/commit/78c028321c740defe18db6ccd111fc542f4d2c0b) fix(client): the first-person arm and the player models wear the player's own skin ### 📊 Changes **3 files changed** (+51 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -4) 📝 `crates/horizon-client/src/game/remote.rs` (+36 -10) 📝 `crates/horizon-client/src/tab_list.rs` (+8 -0) </details> ### 📄 Description ## What and why Fixes #2921: the first-person empty arm always drew Steve, even signed in with a Microsoft account. - **First-person arm**: it now uses the local player's skin, the same one the inventory's player model already shows, and falls back to Steve only while no skin is known. - **Player models without a downloaded skin** wear their profile's default skin (`DefaultPlayerSkin.get`), as the player list already does, instead of keeping whatever they had. `tab_list::default_model_skin` maps the default character to its wide variant, since the player model has no slim arms yet (slim arms are #2926, not part of this). - **Single player**: the integrated server is offline-mode, so its player info carries no `textures` and the local player had no skin there at all. When the server sends none, the signed-in account's own profile is fetched from the services through the existing `skins::Resolver` (`Minecraft.profileFuture`, `MinecraftSessionService.fetchProfile`), so the player model and the arm show the account's skin. Offline or without a session nothing changes. ## Vanilla reference - `PlayerRenderer.renderRightHand` / `renderHand`: the arm is drawn with `AbstractClientPlayer.getSkin().texture()`. - `PlayerInfo.getSkin` / `createSkinLookup` and `DefaultPlayerSkin.get(UUID)`: the default skin for a profile without textures. - `Minecraft.profileFuture` (`minecraftSessionService.fetchProfile(user.getProfileId(), true)`): the client's own profile and textures, independent of the server. No harness: this is skin selection for rendering; `tab_list` has a unit test for the default model skin. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Windows, against upstream/main at 27c355942, 8 min 33 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +51 −14 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 369 run, FAILED (failures=2, errors=7, skipped=1) (1 min 19 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (2 min 26 s) | | tests: horizon-client | ❌ 1133 passed, 2 failed (3 min 47 s) | | doc tests | ✅ 0 passed (44 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | The failures are Windows-only and unrelated to this change (no Python files touched): `crash::tests::stacks_start_at_the_panicking_frame` (the frame path comes out as `/src/crash.rs` on Windows) and `save::tests::session_lock_is_exclusive` (Windows byte-range lock error 33). Both fail the same way on upstream/main here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:32 +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#4732
No description provided.