[PR #3724] [MERGED] Show your own skin: offline skins from the launcher, the host's skin … #5171

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3724
Author: @aangeraakt
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: claude/kind-dijkstra-aaxkhw


📝 Commits (5)

  • 26fa543 Show your own skin: offline skins from the launcher, the host's skin on LAN
  • f4bdc66 Never wait on the owner's profile fetch: list its skin once it lands
  • b010253 Merge main into claude/kind-dijkstra-aaxkhw
  • 9845e2c Fit SyncData::empty to main's SyncData
  • faf7d52 Merge main into claude/kind-dijkstra-aaxkhw

📊 Changes

10 files changed (+383 additions, -5 deletions)

View changed files

📝 crates/horizon-client-render/src/skins.rs (+70 -0)
📝 crates/horizon-client/src/game/dedicated.rs (+1 -0)
📝 crates/horizon-client/src/game/integrated.rs (+19 -1)
📝 crates/horizon-client/src/game/remote.rs (+14 -0)
📝 crates/horizon-client/src/lan/conn.rs (+58 -0)
📝 crates/horizon-client/src/lan/data.rs (+20 -0)
📝 crates/horizon-client/src/lan/hub.rs (+72 -1)
📝 crates/horizon-client/src/lan/mod.rs (+48 -0)
📝 crates/horizon-client/tests/lan_bot.rs (+80 -2)
📝 launcher/src/skins.rs (+1 -1)

📄 Description

🤖 Opened by Aangeraakt's AI agent (Claude Code), not by Aangeraakt themselves.

What and why

Two gaps that left players on the default Steve/Alex skin:

  1. Offline names never showed their chosen skin. The launcher already passes the skin picked for an offline name in HORIZON_OFFLINE_SKIN / HORIZON_OFFLINE_SKIN_MODEL (launcher/src/skins.rs), but the game only read the cape (HORIZON_OFFLINE_CAPE). Now skins::offline_skin() reads the PNG (64×64 or legacy 64×32, via process_legacy_skin) and update_remote_skins draws it, slim or classic, on the local player whenever neither the server nor a signed-in account gives one. It shows in third person and on the inventory model.
  2. When you host (single player opened to LAN), guests saw you with the default skin. The window's own memory connection logged in to its server thread with no profile properties, so the player list sent no textures for the host. Now open_integrated starts fetching the signed-in account's profile (fetchProfile(id, requireSecure=true), so the textures property is signed) while the world loads. The owner's login uses those properties, and every client, LAN guests included, receives the owner's real skin. The login waits at most 10 s for the fetch. If the fetch fails or times out, the host plays without properties, as before.

Things this PR does not change:

  • A signed-in player's own skin in single player and on online-mode servers already works on main (own_textures, and PlayerInfoUpdate textures). This PR leaves that path alone.
  • LAN guests on a Horizon-hosted world still see each other as default skins, because Horizon's LAN is offline-mode and guests aren't authenticated. Fixing that means running LAN in online mode as vanilla does, which is a bigger, separate change.
  • #2937 covered the signed-in single-player skin, which main has since implemented another way. This PR doesn't overlap it.

Vanilla reference

  • ServerLoginPacketListenerImpl.handleHello / IntegratedServer.getSingleplayerProfile (Minecraft.getGameProfile, from profileFuture): the singleplayer owner logs in with its full, signed profile.
  • SkinTextureDownloader.processLegacySkin for the offline skin's layout.
  • The offline skin itself is Horizon-only: the launcher feature vanilla doesn't have. It's only active when the launcher sets the variable.

Self-check

**pr_ready** (`tools/pr_ready.py --quick` on vm, against main at ba86a4d76, 8 min 48 s)

| Check | Result |
| --- | --- |
| Scope | ⚠️ 8 files, +257 −3; mixes game, launcher |
| Cargo.lock | ✅ unchanged |
| Public tree | ✅ |
| Python tests | ✅ 411 passed (1 min 19 s) |
| rustfmt | ✅ (15 s) |
| clippy | ❌ failed (51 s) |
| tests: horizon-client, horizon-client-render | ✅ 1323 passed (4 min 29 s) |
| doc tests | ✅ 0 passed (1 min 36 s) |
| launcher rustfmt | ✅ (6 s) |
| launcher clippy | ✅ (4 s) |
| launcher tests | ✅ 264 passed (8 s) |
| Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses |
  • The clippy ❌ comes from an existing lint in an untouched file: manual_range_contains at crates/horizon-world/src/worldgen/aquifer/noise_based.rs:450, flagged by the VM's newer clippy. cargo clippy -p horizon-client -p horizon-client-render --lib --bins --tests -- -D warnings -A clippy::manual_range_contains passes clean.
  • The launcher change is a single doc comment.
  • New tests:
    • lan::conn::tests::the_owner_logs_in_with_its_own_profile_properties runs a real Lan with a memory connection and a TCP guest. The owner's LoginFinished carries the properties and the guest's does not. I confirmed it fails with the fix disabled.
    • an_owner_without_an_answer_logs_in_without_properties
    • skins::tests::offline_skins_read_like_downloaded_ones covers 64×64, legacy 64×32, the slim/classic model, and rejected files.
  • Not run: the game itself and the parity harnesses. The VM had no .local/ vanilla resources, and its network policy blocks Mojang's services, so neither a live skin fetch nor an in-game look was possible. Please check in game: an offline name with a launcher skin in third person (F5), and a signed-in host opened to LAN as seen from a second client.

🤖 Generated with Claude Code


🔄 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/3724 **Author:** [@aangeraakt](https://github.com/aangeraakt) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `claude/kind-dijkstra-aaxkhw` --- ### 📝 Commits (5) - [`26fa543`](https://github.com/horizon-rust/horizon/commit/26fa54369c3e52aecfbc9faeb0f58dca5aec50f3) Show your own skin: offline skins from the launcher, the host's skin on LAN - [`f4bdc66`](https://github.com/horizon-rust/horizon/commit/f4bdc6678153726b253cb3de2dd46f0f42b166f0) Never wait on the owner's profile fetch: list its skin once it lands - [`b010253`](https://github.com/horizon-rust/horizon/commit/b01025353e9b35638ab64889f7b980df64ed468e) Merge main into claude/kind-dijkstra-aaxkhw - [`9845e2c`](https://github.com/horizon-rust/horizon/commit/9845e2cd9b0e30ea449814c5597876e8c0c64ce7) Fit SyncData::empty to main's SyncData - [`faf7d52`](https://github.com/horizon-rust/horizon/commit/faf7d52f20c74808b154cc14a25d63aeab93c84f) Merge main into claude/kind-dijkstra-aaxkhw ### 📊 Changes **10 files changed** (+383 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/skins.rs` (+70 -0) 📝 `crates/horizon-client/src/game/dedicated.rs` (+1 -0) 📝 `crates/horizon-client/src/game/integrated.rs` (+19 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+14 -0) 📝 `crates/horizon-client/src/lan/conn.rs` (+58 -0) 📝 `crates/horizon-client/src/lan/data.rs` (+20 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+72 -1) 📝 `crates/horizon-client/src/lan/mod.rs` (+48 -0) 📝 `crates/horizon-client/tests/lan_bot.rs` (+80 -2) 📝 `launcher/src/skins.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Aangeraakt's AI agent (Claude Code), not by Aangeraakt themselves. ## What and why Two gaps that left players on the default Steve/Alex skin: 1. **Offline names never showed their chosen skin.** The launcher already passes the skin picked for an offline name in `HORIZON_OFFLINE_SKIN` / `HORIZON_OFFLINE_SKIN_MODEL` (`launcher/src/skins.rs`), but the game only read the cape (`HORIZON_OFFLINE_CAPE`). Now `skins::offline_skin()` reads the PNG (64×64 or legacy 64×32, via `process_legacy_skin`) and `update_remote_skins` draws it, slim or classic, on the local player whenever neither the server nor a signed-in account gives one. It shows in third person and on the inventory model. 2. **When you host (single player opened to LAN), guests saw you with the default skin.** The window's own memory connection logged in to its server thread with no profile properties, so the player list sent no `textures` for the host. Now `open_integrated` starts fetching the signed-in account's profile (`fetchProfile(id, requireSecure=true)`, so the `textures` property is signed) while the world loads. The owner's login uses those properties, and every client, LAN guests included, receives the owner's real skin. The login waits at most 10 s for the fetch. If the fetch fails or times out, the host plays without properties, as before. Things this PR does not change: - A signed-in player's own skin in single player and on online-mode servers already works on main (`own_textures`, and `PlayerInfoUpdate` textures). This PR leaves that path alone. - LAN guests on a Horizon-hosted world still see *each other* as default skins, because Horizon's LAN is offline-mode and guests aren't authenticated. Fixing that means running LAN in online mode as vanilla does, which is a bigger, separate change. - #2937 covered the signed-in single-player skin, which main has since implemented another way. This PR doesn't overlap it. ## Vanilla reference - `ServerLoginPacketListenerImpl.handleHello` / `IntegratedServer.getSingleplayerProfile` (`Minecraft.getGameProfile`, from `profileFuture`): the singleplayer owner logs in with its full, signed profile. - `SkinTextureDownloader.processLegacySkin` for the offline skin's layout. - The offline skin itself is Horizon-only: the launcher feature vanilla doesn't have. It's only active when the launcher sets the variable. ## Self-check ``` **pr_ready** (`tools/pr_ready.py --quick` on vm, against main at ba86a4d76, 8 min 48 s) | Check | Result | | --- | --- | | Scope | ⚠️ 8 files, +257 −3; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 411 passed (1 min 19 s) | | rustfmt | ✅ (15 s) | | clippy | ❌ failed (51 s) | | tests: horizon-client, horizon-client-render | ✅ 1323 passed (4 min 29 s) | | doc tests | ✅ 0 passed (1 min 36 s) | | launcher rustfmt | ✅ (6 s) | | launcher clippy | ✅ (4 s) | | launcher tests | ✅ 264 passed (8 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | ``` - The clippy ❌ comes from an existing lint in an untouched file: `manual_range_contains` at `crates/horizon-world/src/worldgen/aquifer/noise_based.rs:450`, flagged by the VM's newer clippy. `cargo clippy -p horizon-client -p horizon-client-render --lib --bins --tests -- -D warnings -A clippy::manual_range_contains` passes clean. - The launcher change is a single doc comment. - New tests: - `lan::conn::tests::the_owner_logs_in_with_its_own_profile_properties` runs a real `Lan` with a memory connection and a TCP guest. The owner's `LoginFinished` carries the properties and the guest's does not. I confirmed it fails with the fix disabled. - `an_owner_without_an_answer_logs_in_without_properties` - `skins::tests::offline_skins_read_like_downloaded_ones` covers 64×64, legacy 64×32, the slim/classic model, and rejected files. - **Not run:** the game itself and the parity harnesses. The VM had no `.local/` vanilla resources, and its network policy blocks Mojang's services, so neither a live skin fetch nor an in-game look was possible. Please check in game: an offline name with a launcher skin in third person (F5), and a signed-in host opened to LAN as seen from a second client. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:44 +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#5171
No description provided.