[PR #521] [MERGED] Honor villager and zombie villager hat metadata #2623

Closed
opened 2026-11-02 15:57:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/521
Author: @Online5277
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: fix/villager-hat-metadata


📝 Commits (1)

  • c47dc83 Honor villager texture hat metadata in type layers

📊 Changes

5 files changed (+143 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/packs.rs (+2 -0)
📝 crates/horizon-client/src/mobs.rs (+1 -0)
📝 crates/horizon-client/src/mobs/data.rs (+4 -0)
📝 crates/horizon-client/src/mobs/render.rs (+8 -0)
➕ crates/horizon-client/src/mobs/villager_hats.rs (+128 -0)

📄 Description

Villager biome/type layers currently always include their head overlay, so full profession hats can overlap them. Cache each villager and zombie-villager type/profession texture's villager.hat metadata when resources load, and refresh it on resource-pack reload.

For the type layer, show its head overlay when the profession hat is NONE, or when the profession is PARTIAL and the type is not FULL. Otherwise suppress that layer's entire head subtree, matching the exported native no-hat models. This also applies to baby models and spawner renders through the common rendering path.

Fixes #334.

Validation:

  • Ran the data-backed regression with the prepared 26.3 resources: it reads the actual texture metadata and compares emitted vertices against exported normal/no-hat adult and baby villager/zombie-villager models, covering NONE/PARTIAL/FULL interactions.
  • Formatting, diff/public-tree checks, and client Clippy with all targets pass.

The model regression is ignored by default because it needs privately owned prepared game resources. No game assets or extracted native code are committed.

Draft for visual testing: compare desert/snow farmers (FULL profession hats), desert/snow butchers (PARTIAL), plains butchers, and unemployed villagers against vanilla. Check zombie villagers and babies too. A pack that changes villager.hat should take effect after reloading resources. No game window or native pixel comparison was run.

Kira's write rate limit prevented claiming the issue; GitHub showed no owner or covering PR when work started.


🔄 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/521 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/villager-hat-metadata` --- ### 📝 Commits (1) - [`c47dc83`](https://github.com/horizon-rust/horizon/commit/c47dc83eab96ade6a625c76e1482a8f2f97751bf) Honor villager texture hat metadata in type layers ### 📊 Changes **5 files changed** (+143 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/packs.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/data.rs` (+4 -0) 📝 `crates/horizon-client/src/mobs/render.rs` (+8 -0) ➕ `crates/horizon-client/src/mobs/villager_hats.rs` (+128 -0) </details> ### 📄 Description Villager biome/type layers currently always include their head overlay, so full profession hats can overlap them. Cache each villager and zombie-villager type/profession texture's `villager.hat` metadata when resources load, and refresh it on resource-pack reload. For the type layer, show its head overlay when the profession hat is NONE, or when the profession is PARTIAL and the type is not FULL. Otherwise suppress that layer's entire head subtree, matching the exported native no-hat models. This also applies to baby models and spawner renders through the common rendering path. Fixes #334. Validation: - Ran the data-backed regression with the prepared 26.3 resources: it reads the actual texture metadata and compares emitted vertices against exported normal/no-hat adult and baby villager/zombie-villager models, covering NONE/PARTIAL/FULL interactions. - Formatting, diff/public-tree checks, and client Clippy with all targets pass. The model regression is ignored by default because it needs privately owned prepared game resources. No game assets or extracted native code are committed. Draft for visual testing: compare desert/snow farmers (FULL profession hats), desert/snow butchers (PARTIAL), plains butchers, and unemployed villagers against vanilla. Check zombie villagers and babies too. A pack that changes `villager.hat` should take effect after reloading resources. No game window or native pixel comparison was run. Kira's write rate limit prevented claiming the issue; GitHub showed no owner or covering PR when work started. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:43 +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#2623
No description provided.