[PR #4372] [MERGED] item sprites: another namespace's animated texture packs its first frame and animates #5587

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4372
Author: @iLostName
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: namespaced-item-animations


📝 Commits (1)

  • 7ee787f item sprites: another namespace's animated texture packs its first frame and animates

📊 Changes

1 file changed (+104 additions, -41 deletions)

View changed files

📝 crates/horizon-client-render/src/hud.rs (+104 -41)

📄 Description

What and why

A server pack's animated item texture (an NPC skin of 20 frames stacked in one PNG, lobby:item/... with an animation mcmeta) was packed whole into the GUI atlas, which world items and item displays sample. atlas_sprites looked for item/ in the path with its namespace still on, so only minecraft: strips were cut to a frame. A model's UVs then spanned every frame at once, and NPCs built from item displays drew as stacks of stripes. The strip now keeps the mcmeta's first frame, through the same helper as the packed vanilla files, and animates. The new test packs a namespaced two-frame item texture as one 16x16 frame with its animation.

Vanilla reference

SpriteLoader reads every sprite's AnimationMetadataSection (frameSize) whatever its namespace, and the items atlas's directory source for item/ lists all namespaces.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 0a341cc35, 5 min 6 s)

Check Result
Scope ✅ 1 files, +104 −41
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 480 passed (1 min 17 s)
rustfmt ✅ (11 s)
clippy ✅ (1 min 32 s)
tests: horizon-client-render ✅ 574 passed (1 min 43 s)
doc tests ✅ 0 passed (20 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Parity is left to CI.


🔄 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/4372 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `namespaced-item-animations` --- ### 📝 Commits (1) - [`7ee787f`](https://github.com/horizon-rust/horizon/commit/7ee787f8de8c75755dda1a7350b9e5b4705c68fd) item sprites: another namespace's animated texture packs its first frame and animates ### 📊 Changes **1 file changed** (+104 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/hud.rs` (+104 -41) </details> ### 📄 Description ## What and why A server pack's animated item texture (an NPC skin of 20 frames stacked in one PNG, `lobby:item/...` with an `animation` mcmeta) was packed whole into the GUI atlas, which world items and item displays sample. `atlas_sprites` looked for `item/` in the path with its namespace still on, so only `minecraft:` strips were cut to a frame. A model's UVs then spanned every frame at once, and NPCs built from item displays drew as stacks of stripes. The strip now keeps the mcmeta's first frame, through the same helper as the packed vanilla files, and animates. The new test packs a namespaced two-frame item texture as one 16x16 frame with its animation. ## Vanilla reference `SpriteLoader` reads every sprite's `AnimationMetadataSection` (`frameSize`) whatever its namespace, and the items atlas's `directory` source for `item/` lists all namespaces. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 0a341cc35, 5 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +104 −41 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 480 passed (1 min 17 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (1 min 32 s) | | tests: horizon-client-render | ✅ 574 passed (1 min 43 s) | | doc tests | ✅ 0 passed (20 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Parity is left to CI. --- <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:36 +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#5587
No description provided.