[PR #3663] [CLOSED] Skins and maps upload again after a resource pack reload #5134

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3663
Author: @aangeraakt
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: fix/skins-after-pack-reload


📝 Commits (2)

  • 0b7c587 Skins and maps upload again after a resource pack reload
  • 5210a5d Merge remote-tracking branch 'origin/main' into fix/skins-after-pack-reload

📊 Changes

5 files changed (+106 additions, -36 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -2)
➕ crates/horizon-client/src/game/atlas_slots.rs (+73 -0)
📝 crates/horizon-client/src/game/maps.rs (+21 -19)
📝 crates/horizon-client/src/game/packs.rs (+4 -0)
📝 crates/horizon-client/src/game/remote.rs (+5 -15)

📄 Description

🤖 Opened by aangeraakt's AI agent (Claude Code), not by aangeraakt themselves.

What and why

Split out of #3277, as asked there. A resource pack reload replaces the GUI atlas with one whose horizon/skin{N} and horizon/map{N} slots are blank, but Game kept its slot tables. show_skin still said yes, so again_skin never re-queued the image, and the player model named a sprite the new atlas doesn't have and drew as nothing (d3grando's analysis in #3277).

The skin and map slot tables were the same LRU written twice. They're now one AtlasSlots type (game/atlas_slots.rs), and apply_staged_pack forgets both on the atlas swap. A forgotten map gets a new slot and is marked texture_dirty, so it uploads again too.

Fixes #3385. This helps with #3122 but doesn't close it: reporters there say rejoining doesn't bring skins back either, and this change doesn't cover that.

Credit to the original #3277 change and to d3grando's diagnosis.

Vanilla reference

Horizon-only: vanilla keeps skins in their own DynamicTextures, which a reload doesn't touch. Horizon puts them in fixed GUI-atlas slots, so it has to forget them when that atlas is rebuilt.

Self-check

tools/pr_ready.py --quick on Windows: rustfmt ✅, clippy ✅, horizon-client tests ✅ (800 passed, including game::atlas_slots::tests::a_new_atlas_shows_no_stored_skin), Cargo.lock unchanged, public tree ✅. Python tests: 3 failures in test_port_publish/test_roadmap from Windows path/encoding; no Python is touched here.

🤖 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/3663 **Author:** [@aangeraakt](https://github.com/aangeraakt) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/skins-after-pack-reload` --- ### 📝 Commits (2) - [`0b7c587`](https://github.com/horizon-rust/horizon/commit/0b7c587c49d6cc60c2d89940e84a03d391edeaae) Skins and maps upload again after a resource pack reload - [`5210a5d`](https://github.com/horizon-rust/horizon/commit/5210a5d3b49c9a62749c68a376e41a36309a74fd) Merge remote-tracking branch 'origin/main' into fix/skins-after-pack-reload ### 📊 Changes **5 files changed** (+106 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -2) ➕ `crates/horizon-client/src/game/atlas_slots.rs` (+73 -0) 📝 `crates/horizon-client/src/game/maps.rs` (+21 -19) 📝 `crates/horizon-client/src/game/packs.rs` (+4 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+5 -15) </details> ### 📄 Description > 🤖 Opened by aangeraakt's AI agent (Claude Code), not by aangeraakt themselves. ## What and why Split out of #3277, as asked there. A resource pack reload replaces the GUI atlas with one whose `horizon/skin{N}` and `horizon/map{N}` slots are blank, but `Game` kept its slot tables. `show_skin` still said yes, so `again_skin` never re-queued the image, and the player model named a sprite the new atlas doesn't have and drew as nothing (d3grando's analysis in #3277). The skin and map slot tables were the same LRU written twice. They're now one `AtlasSlots` type (`game/atlas_slots.rs`), and `apply_staged_pack` forgets both on the atlas swap. A forgotten map gets a new slot and is marked `texture_dirty`, so it uploads again too. Fixes #3385. This helps with #3122 but doesn't close it: reporters there say rejoining doesn't bring skins back either, and this change doesn't cover that. Credit to the original #3277 change and to d3grando's diagnosis. ## Vanilla reference Horizon-only: vanilla keeps skins in their own `DynamicTexture`s, which a reload doesn't touch. Horizon puts them in fixed GUI-atlas slots, so it has to forget them when that atlas is rebuilt. ## Self-check `tools/pr_ready.py --quick` on Windows: rustfmt ✅, clippy ✅, horizon-client tests ✅ (800 passed, including `game::atlas_slots::tests::a_new_atlas_shows_no_stored_skin`), Cargo.lock unchanged, public tree ✅. Python tests: 3 failures in `test_port_publish`/`test_roadmap` from Windows path/encoding; no Python is touched here. 🤖 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:10:28 +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#5134
No description provided.