[PR #4274] [MERGED] Render the jeb_ sheep's wool colour, as vanilla does #5534

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4274
Author: @MSedgeMC
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/3958-jeb-sheep


📝 Commits (1)

  • fb8e62b Render the jeb_ sheep's wool colour, as vanilla does

📊 Changes

1 file changed (+110 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/mobs/render.rs (+110 -6)

📄 Description

Fixes #3958.

Vanilla's SheepRenderer.extractRenderState reads the custom name with MobRenderer.checkMagicName(entity, "jeb_") (exact, case-sensitive, custom name only) and SheepRenderState.getWoolColor() then returns ColorLerper.getLerpedColor(Type.SHEEP, ageInTicks): the 16 DyeColor.values() colours at 0.75 brightness (white special-cased to 0xFFE6E6E6), 25 ticks per colour, lerped by ARGB.srgbLerp = Mth.lerpInt = start + floor(delta * (end - start)) per channel. SheepWoolUndercoatLayer also draws for a jeb_ sheep. Horizon read no name at all, so the egg did nothing.

One file (crates/horizon-client/src/mobs/render.rs): a jeb_wool_rgb(age) helper next to the existing sheep_wool_rgb, the custom_name == Some("jeb_") branch in the sheep layer arm, the widened undercoat guard, and layers() taking the render state's ageInTicks (Mob.age plus the partial tick) so the hue moves per frame rather than stepping at 20 Hz.

What is proven: the tests were run on a build box with the pinned 26.3 resources prepared, so the .local-gated layer test really executes: cargo test -p horizon-client --lib jeb → 2 passed, 0 failed. The colour vectors (0xE6E6E6, 0xD0A37D, 0xBA6015, 0x953A8D, 0xDDDDDD, wrap at 400) were derived from the jar and independently re-derived by a second reader before the test was written; the dyed, baby and sheared cases are covered. The name field is the same custom_name that Toast already uses, so that plumbing is known good.

What is not proven: no in-game screenshot — the tests exercise the real layers() path, but nobody has watched a sheep cycle on screen. And pr_ready was not run on this branch; CI's verify is the workspace-wide check.

Known gap, not introduced here and left for its own issue: a sheared jeb_ (or dyed) sheep loses its undercoat, because vanilla's SheepWoolUndercoatLayer has no sheared guard while Horizon's outer arm does. The test asserts only that the wool layer disappears when sheared, so fixing that later will not break it.


🔄 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/4274 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/3958-jeb-sheep` --- ### 📝 Commits (1) - [`fb8e62b`](https://github.com/horizon-rust/horizon/commit/fb8e62bc7e941de728135d4397f2bbd924dce204) Render the jeb_ sheep's wool colour, as vanilla does ### 📊 Changes **1 file changed** (+110 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/render.rs` (+110 -6) </details> ### 📄 Description Fixes #3958. Vanilla's `SheepRenderer.extractRenderState` reads the custom name with `MobRenderer.checkMagicName(entity, "jeb_")` (exact, case-sensitive, custom name only) and `SheepRenderState.getWoolColor()` then returns `ColorLerper.getLerpedColor(Type.SHEEP, ageInTicks)`: the 16 `DyeColor.values()` colours at 0.75 brightness (white special-cased to `0xFFE6E6E6`), 25 ticks per colour, lerped by `ARGB.srgbLerp` = `Mth.lerpInt` = `start + floor(delta * (end - start))` per channel. `SheepWoolUndercoatLayer` also draws for a `jeb_` sheep. Horizon read no name at all, so the egg did nothing. One file (`crates/horizon-client/src/mobs/render.rs`): a `jeb_wool_rgb(age)` helper next to the existing `sheep_wool_rgb`, the `custom_name == Some("jeb_")` branch in the sheep layer arm, the widened undercoat guard, and `layers()` taking the render state's `ageInTicks` (`Mob.age` plus the partial tick) so the hue moves per frame rather than stepping at 20 Hz. **What is proven:** the tests were run on a build box with the pinned 26.3 resources prepared, so the `.local`-gated layer test really executes: `cargo test -p horizon-client --lib jeb` → 2 passed, 0 failed. The colour vectors (`0xE6E6E6`, `0xD0A37D`, `0xBA6015`, `0x953A8D`, `0xDDDDDD`, wrap at 400) were derived from the jar and independently re-derived by a second reader before the test was written; the dyed, baby and sheared cases are covered. The name field is the same `custom_name` that Toast already uses, so that plumbing is known good. **What is not proven:** no in-game screenshot — the tests exercise the real `layers()` path, but nobody has watched a sheep cycle on screen. And `pr_ready` was not run on this branch; CI's `verify` is the workspace-wide check. Known gap, not introduced here and left for its own issue: a sheared `jeb_` (or dyed) sheep loses its undercoat, because vanilla's `SheepWoolUndercoatLayer` has no sheared guard while Horizon's outer arm does. The test asserts only that the wool layer disappears when sheared, so fixing that later will not break it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:14 +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#5534
No description provided.