[PR #5442] [MERGED] Draw a head profile's texture override instead of its skin #6291

Closed
opened 2026-11-03 06:17:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5442
Author: @ezejde
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/head-profile-texture-patch


📝 Commits (3)

  • 7195588 Draw a head profile's texture override instead of its skin
  • 5a2f191 fix(skins): a head's texture patch only names a file inside the packs
  • 9c77c75 Merge main into #5442

📊 Changes

6 files changed (+166 additions, -5 deletions)

View changed files

📝 crates/horizon-client-render/src/chunk/block_entity.rs (+3 -0)
📝 crates/horizon-client-render/src/containers.rs (+1 -0)
📝 crates/horizon-client-render/src/skins.rs (+141 -0)
📝 crates/horizon-client/src/game.rs (+9 -5)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+9 -0)
📝 crates/horizon-client/src/game/packs.rs (+3 -0)

📄 Description

🤖 Opened by ezejde's AI agent (Claude Code), not by ezejde personally.

What and why

A ResolvableProfile can carry a texture id that replaces the skin. Datapacks use it with a server resource pack to draw invisible player heads as collision boxes inside display-entity decorations. Horizon ignored the field and drew the profile's default skin, so a random default skin showed inside every decoration.

Placed heads and head items now read the texture field and draw that texture. A minecraft: texture uses the atlas sprite. Another namespace's texture loads from the resource packs into a skin slot, scaled to 64x64, and loads again after a pack reload.

Fixes #5376

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

ResolvableProfile.skinPatch(), PlayerSkin.Patch.apply, ClientAsset.ResourceTexture, as SkullBlockRenderer and the head item renderer get the skin through PlayerSkinRenderCache. Not checked with tools/rea_vanilla.py: the vanilla data wasn't available where this was written. No harness added: this is client rendering.

Tested in-game: a resource pack with ethereal:textures/entity/plush_blank.png, then /setblock ~ ~ ~ minecraft:player_head{profile:{texture:"ethereal:entity/plush_blank"}} and /give @s minecraft:player_head[profile={texture:"ethereal:entity/plush_blank"}]. Before: a default skin. After: invisible, as in vanilla.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick, against origin/main at 2b8c6e90b, Rust 1.99.1)

Check Result
Scope ✅ 6 files, +132 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 2 failing on main too, unrelated: test_triage_command (trusted-reviewers list) and test_perf_bench
rustfmt ✅
clippy ✅
tests: horizon-client, horizon-client-render ✅ 2186 passed
doc tests ✅
Parity ➖ not run (--quick)

Screenshots

Before: a default skin shows inside the decoration.

image

After: the head is invisible.

Screenshot 2026-10-31 at 3 43 56 PM

🤖 Generated with Claude Code

https://claude.ai/code/session_01P1ZTfB3AfwKgGnv7UFKYVD


🔄 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/5442 **Author:** [@ezejde](https://github.com/ezejde) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/head-profile-texture-patch` --- ### 📝 Commits (3) - [`7195588`](https://github.com/horizon-rust/horizon/commit/71955880b746681da0ec329e39aa8fa4933b146d) Draw a head profile's texture override instead of its skin - [`5a2f191`](https://github.com/horizon-rust/horizon/commit/5a2f191b22d68bc8b1a1d3cc18977db811c09e2e) fix(skins): a head's texture patch only names a file inside the packs - [`9c77c75`](https://github.com/horizon-rust/horizon/commit/9c77c753a54d5631ac3f97975d79fe76b5cd512c) Merge main into #5442 ### 📊 Changes **6 files changed** (+166 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/chunk/block_entity.rs` (+3 -0) 📝 `crates/horizon-client-render/src/containers.rs` (+1 -0) 📝 `crates/horizon-client-render/src/skins.rs` (+141 -0) 📝 `crates/horizon-client/src/game.rs` (+9 -5) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+9 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+3 -0) </details> ### 📄 Description > 🤖 Opened by ezejde's AI agent (Claude Code), not by ezejde personally. ## What and why A `ResolvableProfile` can carry a `texture` id that replaces the skin. Datapacks use it with a server resource pack to draw invisible player heads as collision boxes inside display-entity decorations. Horizon ignored the field and drew the profile's default skin, so a random default skin showed inside every decoration. Placed heads and head items now read the `texture` field and draw that texture. A `minecraft:` texture uses the atlas sprite. Another namespace's texture loads from the resource packs into a skin slot, scaled to 64x64, and loads again after a pack reload. Fixes #5376 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `ResolvableProfile.skinPatch()`, `PlayerSkin.Patch.apply`, `ClientAsset.ResourceTexture`, as `SkullBlockRenderer` and the head item renderer get the skin through `PlayerSkinRenderCache`. Not checked with `tools/rea_vanilla.py`: the vanilla data wasn't available where this was written. No harness added: this is client rendering. Tested in-game: a resource pack with `ethereal:textures/entity/plush_blank.png`, then `/setblock ~ ~ ~ minecraft:player_head{profile:{texture:"ethereal:entity/plush_blank"}}` and `/give @s minecraft:player_head[profile={texture:"ethereal:entity/plush_blank"}]`. Before: a default skin. After: invisible, as in vanilla. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick`, against origin/main at 2b8c6e90b, Rust 1.99.1) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +132 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 2 failing on main too, unrelated: `test_triage_command` (trusted-reviewers list) and `test_perf_bench` | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client, horizon-client-render | ✅ 2186 passed | | doc tests | ✅ | | Parity | ➖ not run (--quick) | ## Screenshots Before: a default skin shows inside the decoration. <img width="2000" height="1125" alt="image" src="https://github.com/user-attachments/assets/8d2e7c92-2544-44fa-af79-7c77bf85b320" /> After: the head is invisible. <img width="1920" height="1080" alt="Screenshot 2026-10-31 at 3 43 56 PM" src="https://github.com/user-attachments/assets/20a78cde-c0c4-4ff3-9e5a-5d67371ac9f5" /> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01P1ZTfB3AfwKgGnv7UFKYVD --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:17:51 +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#6291
No description provided.