[PR #5859] [MERGED] Pack extra atlas directories a pack adds to blocks.json #6526

Closed
opened 2026-11-03 06:22:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5859
Author: @doodlyyousuf
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/5720-atlas-custom-directory


📝 Commits (3)

  • c509359 Pack extra atlas directories a pack adds to blocks.json
  • 3244c41 Merge main into #5859
  • 42e6769 Atlas: one list of walked texture folders, for the walk and its skip

📊 Changes

1 file changed (+55 additions, -21 deletions)

View changed files

📝 crates/horizon-client-render/src/hud.rs (+55 -21)

📄 Description

🤖 Opened by doodlyyousuf's AI agent (OhMyAgent, grok-4.6), not by doodlyyousuf personally.

What and why

A pack can add its own sprite folders through assets/minecraft/atlases/blocks.json, for example {"type":"directory","source":"custom","prefix":"custom/"}. Vanilla 26.3 packs those textures. Horizon walked only a fixed set of folders (gui, item, block, …), then skipped every minecraft: file source whose sprite name equalled its texture path, on the assumption that the walk had already packed it. Folders such as custom/ were never walked, so the sprite never existed and the item model was invisible in the hotbar, in the hand and on item_display.

Keep the have.contains skip. Only treat a matching File origin as already packed when it sits under a walked folder, so extra atlas directories still load.

Fixes #5720

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

SpriteSourceList.list / atlas directory sources in atlases/blocks.json. A texture under assets/minecraft/textures/custom/ that a pack lists there is a sprite, the same as item/ and block/.

Other projects' code

none

Self-check

cargo test -p horizon-client-render --lib hud::tests::a_pack_directory_outside_the_walked_folders_still_packs -- --exact
ok

Public tree check passed on commit.

🤖 Generated with OhMyAgent (grok-4.6)


🔄 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/5859 **Author:** [@doodlyyousuf](https://github.com/doodlyyousuf) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/5720-atlas-custom-directory` --- ### 📝 Commits (3) - [`c509359`](https://github.com/horizon-rust/horizon/commit/c50935983a597369c6c7fff2418c94c2e27fdc57) Pack extra atlas directories a pack adds to blocks.json - [`3244c41`](https://github.com/horizon-rust/horizon/commit/3244c41556b3457e830c10af0a1392b3b4159dfc) Merge main into #5859 - [`42e6769`](https://github.com/horizon-rust/horizon/commit/42e676948834db817acce9452571271b80238a5c) Atlas: one list of walked texture folders, for the walk and its skip ### 📊 Changes **1 file changed** (+55 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/hud.rs` (+55 -21) </details> ### 📄 Description > 🤖 Opened by doodlyyousuf's AI agent (OhMyAgent, grok-4.6), not by doodlyyousuf personally. ## What and why A pack can add its own sprite folders through `assets/minecraft/atlases/blocks.json`, for example `{"type":"directory","source":"custom","prefix":"custom/"}`. Vanilla 26.3 packs those textures. Horizon walked only a fixed set of folders (`gui`, `item`, `block`, …), then skipped every `minecraft:` file source whose sprite name equalled its texture path, on the assumption that the walk had already packed it. Folders such as `custom/` were never walked, so the sprite never existed and the item model was invisible in the hotbar, in the hand and on `item_display`. Keep the `have.contains` skip. Only treat a matching `File` origin as already packed when it sits under a walked folder, so extra atlas directories still load. Fixes #5720 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `SpriteSourceList.list` / atlas `directory` sources in `atlases/blocks.json`. A texture under `assets/minecraft/textures/custom/` that a pack lists there is a sprite, the same as `item/` and `block/`. ## Other projects' code none ## Self-check ``` cargo test -p horizon-client-render --lib hud::tests::a_pack_directory_outside_the_walked_folders_still_packs -- --exact ok ``` Public tree check passed on commit. 🤖 Generated with OhMyAgent (grok-4.6) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:22:24 +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#6526
No description provided.