[GH-ISSUE #3860] Players on a LAN world see each other with default skins (the LAN server runs in offline mode) #1121

Closed
opened 2026-11-02 15:44:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @deeppacketdev-hub on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3860

Players on a LAN world see each other with default skins (the LAN server runs in offline mode)

Summary

When a world is opened to LAN in Horizon, each player sees their own skin, but every other player (host or guest) has a default skin (Steve, Alex, …). The client side follows vanilla: a remote player's skin comes from the signed textures property in PlayerInfo. The problem is that Horizon's LAN server never puts a textures property into PlayerInfo:

  1. A LAN world authenticates no one (online: None), so each guest logs in with an offline UUID and an empty property list.
  2. The host's own PlayerInfo entry always has an empty property list.

Vanilla authenticates LAN guests (IntegratedServer.initServer calls setUsesAuthentication(true)) and gives the host the signed profile of their account. As a result, skins show up in a vanilla LAN world.

Environment

  • Horizon v0.2.97 (a3acb5f), horizon-macos-arm64, Minecraft 26.3. main as of 2026-10-29 has the same code.
  • All players signed in with Microsoft accounts (--session-file with user_type: msa).
  • Found while playing through the Onyx launcher's friends feature. Onyx forwards the guest's TCP connection to the host's LAN port byte for byte, so the same thing should happen on a plain LAN.

Steps to reproduce

  1. Player A (Microsoft account, custom skin) opens a world in Horizon and opens it to LAN.
  2. Player B (Microsoft account, custom skin) joins it from Horizon or from vanilla Java 26.3.
  3. Look at each other.

Expected: each player sees the other's skin, as in a vanilla LAN world.

Actual: each player sees their own skin, but the other player has a default skin. According to the code below, the tab list also shows no player heads.

Root cause

Links point to v0.2.97.

The LAN server is always offline-mode. NetConfig::lan sets online: None ("none on a LAN world"):
lan/mod.rs#L139, lan/mod.rs#L172.
Both ways of hosting a LAN world use this config (lan_start in game/lan.rs and the integrated server in game/integrated.rs). As a result, handleHello takes the offline branch for every guest:
lan/conn.rs#L706

None => (offline_uuid(&hello.name), Vec::new()),

The guest therefore has no textures property, and the other clients fall back to the default skin for its offline UUID (tab_list::default_skin, as DefaultPlayerSkin.get). The online branch (authenticate → auth::has_joined) already exists and works, but only the dedicated server enables it (game/dedicated.rs#L520).

The host's PlayerInfo has no properties. player_info takes properties only from guests, and the host is not a guest:
lan/hub.rs#L605

properties: guest.map(|g| g.properties.clone()).unwrap_or_default(),

Each player still sees their own skin because update_remote_skins fills in the local player's skin from the signed-in account (own_textures). Remote players get no such fallback. Following PlayerInfo.createSkinLookup, their textures must be signed.

The integrated server's owner has an offline profile even when signed in. It reads auth::current() for the name, then uses offline_uuid(&player) as the owner ("An offline-mode server names its players by their offline profile"):
game/integrated.rs#L221

Tab list heads follow the login packet's online_mode, as vanilla's PlayerTabOverlay follows ClientPacketListener.onlineMode(): show_head = i.online_mode (tab_list.rs#L391). The LAN hub sends online_mode: self.lan.shared.config.online.is_some(), which is false (lan/hub.rs#L708).

What vanilla 26.3 does

Checked against the vanilla 26.3 client jar (unobfuscated):

  • IntegratedServer.initServer: setUsesAuthentication(true), then initializeKeyPair(), unconditionally. A LAN world is online-mode.
  • ServerLoginPacketListenerImpl.handleHello:
    • If server.getSingleplayerProfile() is set and the name matches it, it calls startClientVerification(singleplayerProfile) without encryption. This is the host.
    • Otherwise, if usesAuthentication() && !connection.isMemoryConnection(), it sends ClientboundHelloPacket and then checks SessionService.hasJoinedServer. Guests get their real UUID and signed textures.
    • Otherwise it uses UUIDUtil.createOfflineProfile.
  • The IntegratedServer constructor calls setSingleplayerProfile(minecraft.getGameProfile()). getGameProfile() comes from profileFuture, which is services.sessionService().fetchProfile(user.getProfileId(), true). That is the account's UUID with signed properties, so the host's PlayerInfo entry carries their skin.
  • PlayerList builds ClientboundLoginPacket with onlineMode = server.usesAuthentication(), so the tab list shows heads in a LAN world.

Suggested fix

  1. When auth::current() is a Microsoft session, give the host a real profile:
    • The UUID is the account UUID instead of offline_uuid(name).
    • The properties are the signed ones from the session service's getProfileById with unsigned=false. The private skins::resolve_profile already does this request.
  2. In handleHello, accept the local connection whose name matches the host's profile using that profile, without encryption, as vanilla does with getSingleplayerProfile.
  3. When the host is signed in, open the LAN world with online: Some(OnlineMode { .. }): a key pair generated as dedicated.rs does, with prevent_proxy: false. Vanilla authenticates even when the host plays offline. Keeping offline mode for an offline name would keep LAN play with offline names working; that is your call.
  4. In Hub::player_info, give the host's entry the host profile's properties instead of an empty list.

Once the hub reports online_mode: true, the tab list heads should show without further changes.

Things to keep in mind

  • Guests' UUIDs change from offline to real ones. Their saved data (playerdata/<uuid>.dat, advancements and stats, saved by save_guest under the guest's UUID) would no longer be found unless it is migrated. Vanilla has the same effect when a server switches to online mode.
  • Guests without a valid Microsoft session can no longer join a LAN world hosted by a signed-in player. This matches vanilla.
  • The integrated server's owner is saved with the world (save_guest → playerdata::store), and their records use level.player_uuid, so a new owner UUID should not lose the host's data. The code that compares UUIDs with the owner (host.owner, singleplayer_owner) would need to use the new UUID.
Originally created by @deeppacketdev-hub on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3860 # Players on a LAN world see each other with default skins (the LAN server runs in offline mode) ## Summary When a world is opened to LAN in Horizon, each player sees their own skin, but every other player (host or guest) has a default skin (Steve, Alex, …). The client side follows vanilla: a remote player's skin comes from the signed `textures` property in `PlayerInfo`. The problem is that Horizon's LAN server never puts a `textures` property into `PlayerInfo`: 1. A LAN world authenticates no one (`online: None`), so each guest logs in with an offline UUID and an empty property list. 2. The host's own `PlayerInfo` entry always has an empty property list. Vanilla authenticates LAN guests (`IntegratedServer.initServer` calls `setUsesAuthentication(true)`) and gives the host the signed profile of their account. As a result, skins show up in a vanilla LAN world. ## Environment - Horizon `v0.2.97` (`a3acb5f`), `horizon-macos-arm64`, Minecraft 26.3. `main` as of 2026-10-29 has the same code. - All players signed in with Microsoft accounts (`--session-file` with `user_type: msa`). - Found while playing through the Onyx launcher's friends feature. Onyx forwards the guest's TCP connection to the host's LAN port byte for byte, so the same thing should happen on a plain LAN. ## Steps to reproduce 1. Player A (Microsoft account, custom skin) opens a world in Horizon and opens it to LAN. 2. Player B (Microsoft account, custom skin) joins it from Horizon or from vanilla Java 26.3. 3. Look at each other. **Expected:** each player sees the other's skin, as in a vanilla LAN world. **Actual:** each player sees their own skin, but the other player has a default skin. According to the code below, the tab list also shows no player heads. ## Root cause Links point to `v0.2.97`. **The LAN server is always offline-mode.** `NetConfig::lan` sets `online: None` ("none on a LAN world"): [`lan/mod.rs#L139`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/lan/mod.rs#L139), [`lan/mod.rs#L172`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/lan/mod.rs#L172). Both ways of hosting a LAN world use this config (`lan_start` in `game/lan.rs` and the integrated server in `game/integrated.rs`). As a result, `handleHello` takes the offline branch for every guest: [`lan/conn.rs#L706`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/lan/conn.rs#L706) ```rust None => (offline_uuid(&hello.name), Vec::new()), ``` The guest therefore has no `textures` property, and the other clients fall back to the default skin for its offline UUID (`tab_list::default_skin`, as `DefaultPlayerSkin.get`). The online branch (`authenticate` → `auth::has_joined`) already exists and works, but only the dedicated server enables it ([`game/dedicated.rs#L520`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/game/dedicated.rs#L520)). **The host's `PlayerInfo` has no properties.** `player_info` takes properties only from guests, and the host is not a guest: [`lan/hub.rs#L605`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/lan/hub.rs#L605) ```rust properties: guest.map(|g| g.properties.clone()).unwrap_or_default(), ``` Each player still sees their own skin because `update_remote_skins` fills in the local player's skin from the signed-in account (`own_textures`). Remote players get no such fallback. Following `PlayerInfo.createSkinLookup`, their textures must be signed. **The integrated server's owner has an offline profile even when signed in.** It reads `auth::current()` for the name, then uses `offline_uuid(&player)` as the owner ("An offline-mode server names its players by their offline profile"): [`game/integrated.rs#L221`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/game/integrated.rs#L221) **Tab list heads** follow the login packet's `online_mode`, as vanilla's `PlayerTabOverlay` follows `ClientPacketListener.onlineMode()`: `show_head = i.online_mode` ([`tab_list.rs#L391`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/tab_list.rs#L391)). The LAN hub sends `online_mode: self.lan.shared.config.online.is_some()`, which is `false` ([`lan/hub.rs#L708`](https://github.com/horizon-rust/horizon/blob/v0.2.97/crates/horizon-client/src/lan/hub.rs#L708)). ## What vanilla 26.3 does Checked against the vanilla 26.3 client jar (unobfuscated): - `IntegratedServer.initServer`: `setUsesAuthentication(true)`, then `initializeKeyPair()`, unconditionally. A LAN world is online-mode. - `ServerLoginPacketListenerImpl.handleHello`: - If `server.getSingleplayerProfile()` is set and the name matches it, it calls `startClientVerification(singleplayerProfile)` without encryption. This is the host. - Otherwise, if `usesAuthentication() && !connection.isMemoryConnection()`, it sends `ClientboundHelloPacket` and then checks `SessionService.hasJoinedServer`. Guests get their real UUID and signed `textures`. - Otherwise it uses `UUIDUtil.createOfflineProfile`. - The `IntegratedServer` constructor calls `setSingleplayerProfile(minecraft.getGameProfile())`. `getGameProfile()` comes from `profileFuture`, which is `services.sessionService().fetchProfile(user.getProfileId(), true)`. That is the account's UUID with signed properties, so the host's `PlayerInfo` entry carries their skin. - `PlayerList` builds `ClientboundLoginPacket` with `onlineMode = server.usesAuthentication()`, so the tab list shows heads in a LAN world. ## Suggested fix 1. When `auth::current()` is a Microsoft session, give the host a real profile: - The UUID is the account UUID instead of `offline_uuid(name)`. - The properties are the signed ones from the session service's `getProfileById` with `unsigned=false`. The private `skins::resolve_profile` already does this request. 2. In `handleHello`, accept the local connection whose name matches the host's profile using that profile, without encryption, as vanilla does with `getSingleplayerProfile`. 3. When the host is signed in, open the LAN world with `online: Some(OnlineMode { .. })`: a key pair generated as `dedicated.rs` does, with `prevent_proxy: false`. Vanilla authenticates even when the host plays offline. Keeping offline mode for an offline name would keep LAN play with offline names working; that is your call. 4. In `Hub::player_info`, give the host's entry the host profile's properties instead of an empty list. Once the hub reports `online_mode: true`, the tab list heads should show without further changes. ## Things to keep in mind - Guests' UUIDs change from offline to real ones. Their saved data (`playerdata/<uuid>.dat`, advancements and stats, saved by `save_guest` under the guest's UUID) would no longer be found unless it is migrated. Vanilla has the same effect when a server switches to online mode. - Guests without a valid Microsoft session can no longer join a LAN world hosted by a signed-in player. This matches vanilla. - The integrated server's owner is saved with the world (`save_guest` → `playerdata::store`), and their records use `level.player_uuid`, so a new owner UUID should not lose the host's data. The code that compares UUIDs with the owner (`host.owner`, `singleplayer_owner`) would need to use the new UUID.
Author
Owner

@kacpherek commented on GitHub (Oct 31, 2026):

Fixed by #3868: a LAN world now runs in online mode when the host is signed in, so guests and the host show their real skins and capes. If it still happens on a current nightly, please reopen with the version and logs/latest.log.

<!-- gh-comment-id:6541521959 --> @kacpherek commented on GitHub (Oct 31, 2026): Fixed by #3868: a LAN world now runs in online mode when the host is signed in, so guests and the host show their real skins and capes. If it still happens on a current nightly, please reopen with the version and logs/latest.log.
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#1121
No description provided.