[PR #2307] [MERGED] Server packs: show a progress screen while a pushed pack's resources reload #4191

Closed
opened 2026-11-03 04:15:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2307
Author: @socksprox
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/server-pack-reload-progress


📝 Commits (3)

  • 5179f97 Server packs: show a progress screen while a pushed pack's resources reload
  • 5589edb Server packs: swallow gameplay input while the reload progress shows
  • 9ca282d Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

4 files changed (+256 additions, -59 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+42 -6)
📝 crates/horizon-client/src/game/packs.rs (+117 -35)
📝 crates/horizon-client/src/game/server_packs.rs (+96 -16)
📝 docs/resource-packs.md (+1 -2)

📄 Description

🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself.

What and why

While a server's resource pack downloads, Horizon already shows the same
SystemToast as vanilla (title, percent or bytes), but once the download
finished the whole resource reload ran synchronously on the render thread:
the window froze on "Joining world" for seconds — longer for big packs —
where vanilla's Minecraft.reloadResourcePacks shows a LoadingOverlay
with a progress bar.

The reload is split like the startup loader. A server-pack-reload worker
builds the overlay root, the models and sprites, the menu bundle, the
pack's tables and its CPU mip chains while a progress screen (Preparing
resources -> Loading assets -> Loading pack tables -> Applying resources)
covers the frame; drive_pack_reload then lands the renderer swap and the
resource application on the render thread and ServerPacks.reloaded sends
the feedback replies, including the recovery reload on failure. The pack
screen's own reload reuses the same staged load, so its behaviour is
unchanged.

Vanilla reference

DownloadedPackSource.startReload / PackReloadConfig.Callbacks,
Minecraft.reloadResourcePacks under LoadingOverlay, and
ServerPacks.triggerReloadIfNeeded / reloaded. Checked against the
decompiled 26.3 sources.

Self-check

pr_ready.py --quick: public tree pass, rustfmt pass, clippy pass;
cargo test -p horizon-client --lib server_packs (11 tests) pass.
Verified in-game against a dedicated server offering a throttled 8 MB
pack: the download toast shows during the download, then the progress
screen shows instead of a frozen frame, and the player lands in-world
with the pack applied.

Screenshots

The download toast and join were verified end to end; the reload on the
test pack is fast, so the progress screen is drawn by construction while
the worker runs rather than captured mid-frame.


🔄 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/2307 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-pack-reload-progress` --- ### 📝 Commits (3) - [`5179f97`](https://github.com/horizon-rust/horizon/commit/5179f975826747290826b6453cc4f1be59899265) Server packs: show a progress screen while a pushed pack's resources reload - [`5589edb`](https://github.com/horizon-rust/horizon/commit/5589edb118c0a9152c2dabb2ff22bfaf5aae5b3c) Server packs: swallow gameplay input while the reload progress shows - [`9ca282d`](https://github.com/horizon-rust/horizon/commit/9ca282df1ebecebea17068691c3fb72a1a835883) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **4 files changed** (+256 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+42 -6) 📝 `crates/horizon-client/src/game/packs.rs` (+117 -35) 📝 `crates/horizon-client/src/game/server_packs.rs` (+96 -16) 📝 `docs/resource-packs.md` (+1 -2) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself. ## What and why While a server's resource pack downloads, Horizon already shows the same `SystemToast` as vanilla (title, percent or bytes), but once the download finished the whole resource reload ran synchronously on the render thread: the window froze on "Joining world" for seconds — longer for big packs — where vanilla's `Minecraft.reloadResourcePacks` shows a `LoadingOverlay` with a progress bar. The reload is split like the startup loader. A `server-pack-reload` worker builds the overlay root, the models and sprites, the menu bundle, the pack's tables and its CPU mip chains while a progress screen (Preparing resources -> Loading assets -> Loading pack tables -> Applying resources) covers the frame; `drive_pack_reload` then lands the renderer swap and the resource application on the render thread and `ServerPacks.reloaded` sends the feedback replies, including the recovery reload on failure. The pack screen's own reload reuses the same staged load, so its behaviour is unchanged. ## Vanilla reference `DownloadedPackSource.startReload` / `PackReloadConfig.Callbacks`, `Minecraft.reloadResourcePacks` under `LoadingOverlay`, and `ServerPacks.triggerReloadIfNeeded` / `reloaded`. Checked against the decompiled 26.3 sources. ## Self-check `pr_ready.py --quick`: public tree pass, rustfmt pass, clippy pass; `cargo test -p horizon-client --lib server_packs` (11 tests) pass. Verified in-game against a dedicated server offering a throttled 8 MB pack: the download toast shows during the download, then the progress screen shows instead of a frozen frame, and the player lands in-world with the pack applied. ## Screenshots The download toast and join were verified end to end; the reload on the test pack is fast, so the progress screen is drawn by construction while the worker runs rather than captured mid-frame. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:21 +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#4191
No description provided.