[PR #1934] [MERGED] Player heads render their owner's skin #3877

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

📋 Pull Request Information

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

Base: main ← Head: feat/player-head-skins


📝 Commits (4)

  • 8dcd00f AGENTS.md: the feature-request loop
  • 820cc21 Player heads render their owner's skin
  • 6824224 Player heads: read the profile's skin once, and no skull on a piston head
  • c894345 Player heads without a skin show slim steve, as vanilla

📊 Changes

9 files changed (+270 additions, -6 deletions)

View changed files

📝 crates/horizon-client/examples/probe/block_entity_render_fixture.rs (+1 -0)
📝 crates/horizon-client/src/block_entity_render.rs (+12 -0)
📝 crates/horizon-client/src/containers.rs (+64 -3)
📝 crates/horizon-client/src/game.rs (+5 -2)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+23 -0)
📝 crates/horizon-client/src/game/minecarts.rs (+1 -0)
📝 crates/horizon-client/src/lan/chunks.rs (+14 -0)
📝 crates/horizon-client/src/save.rs (+73 -1)
📝 crates/horizon-client/src/skins.rs (+77 -0)

📄 Description

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

Summary

  • Placed player_head blocks kept no profile: skulls had no block entity, so the
    block-entity renderer drew every head with a hardcoded steve texture.
  • Gives skulls a real BlockEntity carrying SkullBlockEntity's fields
    (profile, note_block_sound, custom_name), so the existing
    block_entity_item pipeline lands minecraft:profile in it on placement
    (/give … player_head[profile={…}] now keeps its owner when placed).
  • save encodes/decodes it so regions keep the profile; entity_tag sends its
    update tag to remote clients inside chunks and in BlockEntityData packets.
  • The renderer resolves the profile through the shared skin downloader (the
    same path head items and the tab list use): the downloaded skins/<sha1>
    slot once it lands, the profile's DefaultPlayerSkin uuid pick while it
    fetches, SKIN_BY_TYPE steve without a profile.
  • Also in this PR: AGENTS.md now documents the feature-request loop (check
    open PRs first, fresh worktree on latest upstream, build, PR via fork).

Vanilla followed: SkullBlockEntity (fields + loadAdditional/saveAdditional),
SkullBlockRenderer.getRenderType/getPlayerSkin, SkinManager.getInsecureSkin,
DefaultPlayerSkin.get(uuid) fallback, BlockItem.updateCustomBlockEntityTag +
BlockEntity.applyComponentsFromItemStack, ClientboundBlockEntityDataPacket,
LevelChunkWithLight block entity tags.

Test plan

  • save::tests::skull_block_entity_keeps_its_profile — NBT round-trip
  • skins::tests::skull_block_entity_profiles_supply_head_skins — profile → skin URL/uuid
  • cargo test -p horizon-client --lib --bins --tests — 1244 pass
  • python3 tools/pr_ready.py --quick — all checks green (below)
  • In-game: give a player_head with a profile, place it, watch it swap from
    the uuid default to the real skin once downloaded; break/re-place keeps profile

pr_ready (tools/pr_ready.py --quick on MacBookPro, against origin/main at 731d88a1d, 47 s)

Check Result
Scope ✅ 10 files, +237 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (8 s)
tests: horizon-client ✅ 1244 passed (32 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Devin (SWE-2 High) in T3 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/1934 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/player-head-skins` --- ### 📝 Commits (4) - [`8dcd00f`](https://github.com/horizon-rust/horizon/commit/8dcd00fc623d0c5c0e75843fe24839028ed15f96) AGENTS.md: the feature-request loop - [`820cc21`](https://github.com/horizon-rust/horizon/commit/820cc211d32d6bf0c7fa677a9c99a60f4cfc0aa8) Player heads render their owner's skin - [`6824224`](https://github.com/horizon-rust/horizon/commit/6824224a333df0771dcf085566cb898416463be3) Player heads: read the profile's skin once, and no skull on a piston head - [`c894345`](https://github.com/horizon-rust/horizon/commit/c89434557b2a60283485d28fea0ed0b6806c6fc3) Player heads without a skin show slim steve, as vanilla ### 📊 Changes **9 files changed** (+270 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/block_entity_render_fixture.rs` (+1 -0) 📝 `crates/horizon-client/src/block_entity_render.rs` (+12 -0) 📝 `crates/horizon-client/src/containers.rs` (+64 -3) 📝 `crates/horizon-client/src/game.rs` (+5 -2) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+23 -0) 📝 `crates/horizon-client/src/game/minecarts.rs` (+1 -0) 📝 `crates/horizon-client/src/lan/chunks.rs` (+14 -0) 📝 `crates/horizon-client/src/save.rs` (+73 -1) 📝 `crates/horizon-client/src/skins.rs` (+77 -0) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself. ## Summary - Placed `player_head` blocks kept no profile: skulls had no block entity, so the block-entity renderer drew every head with a hardcoded steve texture. - Gives skulls a real `BlockEntity` carrying `SkullBlockEntity`'s fields (`profile`, `note_block_sound`, `custom_name`), so the existing `block_entity_item` pipeline lands `minecraft:profile` in it on placement (`/give … player_head[profile={…}]` now keeps its owner when placed). - `save` encodes/decodes it so regions keep the profile; `entity_tag` sends its update tag to remote clients inside chunks and in `BlockEntityData` packets. - The renderer resolves the profile through the shared skin downloader (the same path head items and the tab list use): the downloaded `skins/<sha1>` slot once it lands, the profile's `DefaultPlayerSkin` uuid pick while it fetches, `SKIN_BY_TYPE` steve without a profile. - Also in this PR: `AGENTS.md` now documents the feature-request loop (check open PRs first, fresh worktree on latest upstream, build, PR via fork). Vanilla followed: `SkullBlockEntity` (fields + `loadAdditional`/`saveAdditional`), `SkullBlockRenderer.getRenderType`/`getPlayerSkin`, `SkinManager.getInsecureSkin`, `DefaultPlayerSkin.get(uuid)` fallback, `BlockItem.updateCustomBlockEntityTag` + `BlockEntity.applyComponentsFromItemStack`, `ClientboundBlockEntityDataPacket`, `LevelChunkWithLight` block entity tags. #### Test plan - [x] `save::tests::skull_block_entity_keeps_its_profile` — NBT round-trip - [x] `skins::tests::skull_block_entity_profiles_supply_head_skins` — profile → skin URL/uuid - [x] `cargo test -p horizon-client --lib --bins --tests` — 1244 pass - [x] `python3 tools/pr_ready.py --quick` — all checks green (below) - [ ] In-game: give a `player_head` with a profile, place it, watch it swap from the uuid default to the real skin once downloaded; break/re-place keeps profile **pr_ready** (`tools/pr_ready.py --quick` on MacBookPro, against origin/main at 731d88a1d, 47 s) | Check | Result | | --- | --- | | Scope | ✅ 10 files, +237 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (8 s) | | tests: horizon-client | ✅ 1244 passed (32 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with Devin (SWE-2 High) in T3 Code --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:57 +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#3877
No description provided.