[PR #3565] [MERGED] Copper golem eyes glow on the body model, not the empty eyes layer #5056

Closed
opened 2026-11-03 05:09:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3565
Author: @d3grando
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix-2862


📝 Commits (1)

  • 113cafd Copper golem eyes glow on the body model, not the empty eyes layer

📊 Changes

1 file changed (+56 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/mobs/render.rs (+56 -2)

📄 Description

🤖 Opened by d3grando's AI agent (Claude Code, Claude Opus 5.5), not by d3grando themselves.

Fixes #2862

What and why

A copper golem's eyes didn't glow. The sockets showed the body texture's black pixels at every oxidation level. mobs/render.rs layers() drew the emissive eye texture on the copper_golem#eyes model, and that model has parts but no polygons in the prepared entity-models.json, so the eye texture landed on nothing. Vanilla draws that layer on the body's model. The fix draws it on the mob's own model (m.kind.model_key(), i.e. copper_golem#main), with the same pose, still full-bright.

Vanilla reference

CopperGolemRenderer.<init> adds new LivingEntityEmissiveLayer(this, getEyeTextureLocationProvider(), (state, partial) -> 1.0F, new CopperGolemModel(context.bakeLayer(ModelLayers.COPPER_GOLEM)), RenderTypes::eyes, false). The eye layer's model is baked from ModelLayers.COPPER_GOLEM, the same layer as the body's model passed to MobRenderer, not from ModelLayers.COPPER_GOLEM_EYES. Checked with javap -c -p -v against the 26.3 client jar (constructor bytecode and bootstrap methods).

Tests

New mobs::render::tests::copper_golem_eyes_are_drawn_on_the_body_model. It renders a copper golem at each oxidation level, with an atlas that puts the eye textures in their own UV region, and checks that the eye layer covers every vertex of the body. It needs the prepared resources, like the other tests in that module.

  • before (fix reverted): assertion left == right failed: variant 0: the eye layer covers the body; left: 0, right: 216, FAILED
  • after: test mobs::render::tests::copper_golem_eyes_are_drawn_on_the_body_model ... ok, and all 5 mobs::render::tests pass

Self-check

tools/pr_ready.py and tools/parity.py don't run on this Windows machine (signal.SIGHUP). I ran these instead:

cargo fmt --all -- --check                                                   # clean
cargo clippy -p horizon-client --features mods --all-targets -- -D warnings  # clean
cargo test -p horizon-client --lib mobs::render::tests                       # 5 passed

Screenshots

In game on Windows: four NoAI copper golems (unaffected, exposed, weathered, oxidized, right to left) in a closed stone room at midnight, then lit by a glowstone. Before, the sockets are black. After, the eyes glow in the dark. The oxidized golem on the left faces away in its pose, so its eyes are hidden in both shots.

🤖 Generated with Claude 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/3565 **Author:** [@d3grando](https://github.com/d3grando) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix-2862` --- ### 📝 Commits (1) - [`113cafd`](https://github.com/horizon-rust/horizon/commit/113cafd2d14acd25616f671dd3c4c5dc6ed4bc7a) Copper golem eyes glow on the body model, not the empty eyes layer ### 📊 Changes **1 file changed** (+56 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/render.rs` (+56 -2) </details> ### 📄 Description > 🤖 Opened by d3grando's AI agent (Claude Code, Claude Opus 5.5), not by d3grando themselves. Fixes #2862 ## What and why A copper golem's eyes didn't glow. The sockets showed the body texture's black pixels at every oxidation level. `mobs/render.rs` `layers()` drew the emissive eye texture on the `copper_golem#eyes` model, and that model has parts but no polygons in the prepared `entity-models.json`, so the eye texture landed on nothing. Vanilla draws that layer on the body's model. The fix draws it on the mob's own model (`m.kind.model_key()`, i.e. `copper_golem#main`), with the same pose, still full-bright. ## Vanilla reference `CopperGolemRenderer.<init>` adds `new LivingEntityEmissiveLayer(this, getEyeTextureLocationProvider(), (state, partial) -> 1.0F, new CopperGolemModel(context.bakeLayer(ModelLayers.COPPER_GOLEM)), RenderTypes::eyes, false)`. The eye layer's model is baked from `ModelLayers.COPPER_GOLEM`, the same layer as the body's model passed to `MobRenderer`, not from `ModelLayers.COPPER_GOLEM_EYES`. Checked with `javap -c -p -v` against the 26.3 client jar (constructor bytecode and bootstrap methods). ## Tests New `mobs::render::tests::copper_golem_eyes_are_drawn_on_the_body_model`. It renders a copper golem at each oxidation level, with an atlas that puts the eye textures in their own UV region, and checks that the eye layer covers every vertex of the body. It needs the prepared resources, like the other tests in that module. - before (fix reverted): `assertion left == right failed: variant 0: the eye layer covers the body; left: 0, right: 216`, FAILED - after: `test mobs::render::tests::copper_golem_eyes_are_drawn_on_the_body_model ... ok`, and all 5 `mobs::render::tests` pass ## Self-check `tools/pr_ready.py` and `tools/parity.py` don't run on this Windows machine (`signal.SIGHUP`). I ran these instead: ``` cargo fmt --all -- --check # clean cargo clippy -p horizon-client --features mods --all-targets -- -D warnings # clean cargo test -p horizon-client --lib mobs::render::tests # 5 passed ``` ## Screenshots In game on Windows: four NoAI copper golems (unaffected, exposed, weathered, oxidized, right to left) in a closed stone room at midnight, then lit by a glowstone. Before, the sockets are black. After, the eyes glow in the dark. The oxidized golem on the left faces away in its pose, so its eyes are hidden in both shots. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:55 +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#5056
No description provided.