[PR #5806] [MERGED] feat(mods): notify clients after resource-pack reloads #6511

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5806
Author: @Xmilon
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @levzzz5154

Base: main ← Head: native/client-resource-reload


📝 Commits (2)

  • b87b52e feat(mods): notify clients after successful resource reloads
  • f7dc1bd Merge main into native/client-resource-reload

📊 Changes

3 files changed (+16 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/native_hooks.rs (+4 -0)
📝 crates/horizon-client/src/game/packs.rs (+1 -0)
➕ tools/native-hook-fragments/client_resources_reloaded.json (+11 -0)

📄 Description

🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally.

What and why

Fixes #5805; part of #4953's client resource reload item. Adds native_client_resources_reloaded() at the end of successful apply_staged_pack, after atlas/model/renderer application and client-cache invalidation. Both selection/F3+T and server packs share this path. Application failures return before the notification; staging failures never enter the method.

This is a reload-completion notification only. Initial startup and registration of asynchronous reload listeners are outside its contract. Server datapack reload is separate (#5582).

Kind

  • feature: something new for players

Vanilla reference

The existing LoadingOverlay.tick/reloadResourcePacks application path. The public 26.3 event index documents ClientResourceLoadFinishedEvent; this PR deliberately covers successful reloads, not initial load or the full listener API: https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/package-summary.html . Pinned-bytecode validation not run locally.

Other projects' code

None; public documentation only.

Self-check

Client lib/bin/test Clippy, formatting/diff checks and all four native-hook fragment stamping tests passed. Traced all callers of apply_staged_pack and its failure return. Only a no-op hook and a success-path call are added; no error handling changes. Fragment only. Real-game resource reload, LAN/dedicated not run; CI pending.

🤖 Generated with Codex


🔄 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/5806 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `native/client-resource-reload` --- ### 📝 Commits (2) - [`b87b52e`](https://github.com/horizon-rust/horizon/commit/b87b52e3f33aa311a7eb20ce3030b1ed7ef57af8) feat(mods): notify clients after successful resource reloads - [`f7dc1bd`](https://github.com/horizon-rust/horizon/commit/f7dc1bd0d56982a7ddfcd3078a37460803ae2c39) Merge main into native/client-resource-reload ### 📊 Changes **3 files changed** (+16 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/native_hooks.rs` (+4 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+1 -0) ➕ `tools/native-hook-fragments/client_resources_reloaded.json` (+11 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally. ## What and why Fixes #5805; part of #4953's client resource reload item. Adds `native_client_resources_reloaded()` at the end of successful `apply_staged_pack`, after atlas/model/renderer application and client-cache invalidation. Both selection/F3+T and server packs share this path. Application failures return before the notification; staging failures never enter the method. This is a reload-completion notification only. Initial startup and registration of asynchronous reload listeners are outside its contract. Server datapack reload is separate (#5582). ## Kind - [x] feature: something new for players ## Vanilla reference The existing LoadingOverlay.tick/reloadResourcePacks application path. The public 26.3 event index documents ClientResourceLoadFinishedEvent; this PR deliberately covers successful reloads, not initial load or the full listener API: https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/package-summary.html . Pinned-bytecode validation not run locally. ## Other projects' code None; public documentation only. ## Self-check Client lib/bin/test Clippy, formatting/diff checks and all four native-hook fragment stamping tests passed. Traced all callers of apply_staged_pack and its failure return. Only a no-op hook and a success-path call are added; no error handling changes. Fragment only. Real-game resource reload, LAN/dedicated not run; CI pending. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:21:51 +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#6511
No description provided.