[GH-ISSUE #334] Villager hats: honour the villager metadata (hat: full/partial) #82

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

Originally created by @ludovic111 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/334

Vanilla's VillagerProfessionLayer reads the villager section of each type and profession texture's .png.mcmeta (hat: none, partial, full) and draws the type layer with the no-hat model when the profession's hat covers it (typeHatVisible = professionHat == NONE || professionHat == PARTIAL && typeHat != FULL). Horizon (mobs/render.rs, villager and zombie villager layers) always draws the type layer's hat, so a villager whose profession hat is full shows both hats, with vanilla's own textures and with resource packs that set the metadata.

Fix: read the metadata from the resource root (cached per type/profession, as vanilla does), hide the hat part for the type layer when needed; prove with a screenshot against vanilla or an entity-model harness case.

Found by the resource pack audit (docs/resource-packs.md).

Originally created by @ludovic111 on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/334 Vanilla's `VillagerProfessionLayer` reads the `villager` section of each type and profession texture's `.png.mcmeta` (`hat`: `none`, `partial`, `full`) and draws the type layer with the no-hat model when the profession's hat covers it (`typeHatVisible = professionHat == NONE || professionHat == PARTIAL && typeHat != FULL`). Horizon (`mobs/render.rs`, villager and zombie villager layers) always draws the type layer's hat, so a villager whose profession hat is `full` shows both hats, with vanilla's own textures and with resource packs that set the metadata. Fix: read the metadata from the resource root (cached per type/profession, as vanilla does), hide the `hat` part for the type layer when needed; prove with a screenshot against vanilla or an entity-model harness case. Found by the resource pack audit (docs/resource-packs.md).
bsakaguchi 2026-11-02 15:36:12 +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#82
No description provided.