[PR #1562] [MERGED] Dedicated server: offer server.properties' resource pack as vanilla does #3592

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1562
Author: @ludovic111
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @ludovic111

Base: main ← Head: feat/server-pack-status


📝 Commits (1)

  • ab8b379 Dedicated server: offer server.properties' resource pack as vanilla does

📊 Changes

6 files changed (+766 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+1 -0)
📝 crates/horizon-client/src/lan/conn.rs (+209 -6)
📝 crates/horizon-client/src/lan/mod.rs (+4 -0)
📝 docs/hosting.md (+2 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/ServerPackClient.java (+378 -0)
➕ tools/test_server_resource_pack_parity.py (+172 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Server resource packs, part 1 of 3: the server side. Horizon's dedicated server now offers the resource-pack from server.properties the way vanilla's ServerResourcePackConfigurationTask does. The client side is in #1569 (the pack manager and downloads) and #1570 (prompt, setting, apply). Merge order: this one, #1569, #1570.

What changes

  • After the tags, the configuration phase sends resource_pack_push: the id (or UUID.nameUUIDFromBytes(url) when there is none), the hash, required, and the prompt (JSON text turned back into the NBT component vanilla sends).
  • The server waits for a final answer, sending configuration keepalives every 15 s while the player decides. ACCEPTED and DOWNLOADED are not final.
  • A required pack the player declines disconnects with multiplayer.requiredTexturePrompt.disconnect, in configuration and in play. The log gets vanilla's lines (Disconnecting NAME due to resource pack UUID rejection, then lost connection).
  • docs/hosting.md documents the keys.

Proof

tools/test_server_resource_pack_parity.py starts a real vanilla 26.3 dedicated server and Horizon's with the same server.properties, once with a required pack (id, SHA-1, styled prompt) and once with an optional one (URL only). It joins five scripted players (ServerPackClient.java, vanilla's codecs) and compares every packet they receive, plus the rejection log lines:

Player Answers Vanilla (and now Horizon)
Alice DECLINED kicked in configuration
Bob ACCEPTED, DOWNLOADED, SUCCESSFULLY_LOADED, then DECLINED in play joins, then kicked in play
Carol ACCEPTED, FAILED_DOWNLOAD joins
Dave answers after 20 s kept alive, then joins
Erin DECLINED (optional pack) joins
  • On this branch: server resource pack: 5 players identical.
  • With Horizon's client (#1570), tools/server_pack_e2e.py --horizon-server runs the real client against this server, with a real pack from a local HTTP server: 8/8 scenarios pass (prompt, decline, download, apply, cache, wrong SHA-1, optional declined and accepted, dead URL), the same as against vanilla's server.
  • On origin/main (535f2d2a0) it fails: Horizon sends no resource_pack_push, so Alice joins instead of being kicked, and Bob's play-phase answer errors.

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 535f2d2a0)

Check Result
Scope ✅ 6 files, +766 −6 (378 of them are the Java test client)
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 289 run, 2 errors. Both fail on main on macOS too (/var vs /private/var and the java path in test_parity_runner/test_rust_parity), so they are unrelated
rustfmt ✅
clippy ✅
tests: horizon-client ✅ 1206 passed
doc tests ✅
Parity server_resource_pack run by hand (above). The other 104 affected harnesses are left to CI

🤖 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/1562 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/server-pack-status` --- ### 📝 Commits (1) - [`ab8b379`](https://github.com/horizon-rust/horizon/commit/ab8b3790971138dcaa48b6f241efd4f377f0d140) Dedicated server: offer server.properties' resource pack as vanilla does ### 📊 Changes **6 files changed** (+766 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+1 -0) 📝 `crates/horizon-client/src/lan/conn.rs` (+209 -6) 📝 `crates/horizon-client/src/lan/mod.rs` (+4 -0) 📝 `docs/hosting.md` (+2 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/ServerPackClient.java` (+378 -0) ➕ `tools/test_server_resource_pack_parity.py` (+172 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Server resource packs, part 1 of 3: the server side. Horizon's dedicated server now offers the `resource-pack` from `server.properties` the way vanilla's `ServerResourcePackConfigurationTask` does. The client side is in #1569 (the pack manager and downloads) and #1570 (prompt, setting, apply). Merge order: this one, #1569, #1570. ## What changes - After the tags, the configuration phase sends `resource_pack_push`: the id (or `UUID.nameUUIDFromBytes(url)` when there is none), the hash, `required`, and the prompt (JSON text turned back into the NBT component vanilla sends). - The server waits for a final answer, sending configuration keepalives every 15 s while the player decides. ACCEPTED and DOWNLOADED are not final. - A **required** pack the player declines disconnects with `multiplayer.requiredTexturePrompt.disconnect`, in configuration and in play. The log gets vanilla's lines (`Disconnecting NAME due to resource pack UUID rejection`, then `lost connection`). - `docs/hosting.md` documents the keys. ## Proof `tools/test_server_resource_pack_parity.py` starts a real vanilla 26.3 dedicated server and Horizon's with the same `server.properties`, once with a required pack (id, SHA-1, styled prompt) and once with an optional one (URL only). It joins five scripted players (`ServerPackClient.java`, vanilla's codecs) and compares every packet they receive, plus the rejection log lines: | Player | Answers | Vanilla (and now Horizon) | | --- | --- | --- | | Alice | DECLINED | kicked in configuration | | Bob | ACCEPTED, DOWNLOADED, SUCCESSFULLY_LOADED, then DECLINED in play | joins, then kicked in play | | Carol | ACCEPTED, FAILED_DOWNLOAD | joins | | Dave | answers after 20 s | kept alive, then joins | | Erin | DECLINED (optional pack) | joins | - On this branch: `server resource pack: 5 players identical`. - With Horizon's client (#1570), `tools/server_pack_e2e.py --horizon-server` runs the real client against this server, with a real pack from a local HTTP server: 8/8 scenarios pass (prompt, decline, download, apply, cache, wrong SHA-1, optional declined and accepted, dead URL), the same as against vanilla's server. - On origin/main (535f2d2a0) it **fails**: Horizon sends no `resource_pack_push`, so Alice joins instead of being kicked, and Bob's play-phase answer errors. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 535f2d2a0) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +766 −6 (378 of them are the Java test client) | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 289 run, 2 errors. Both fail on main on macOS too (`/var` vs `/private/var` and the java path in `test_parity_runner`/`test_rust_parity`), so they are unrelated | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 1206 passed | | doc tests | ✅ | | Parity | `server_resource_pack` run by hand (above). The other 104 affected harnesses are left to CI | 🤖 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 04:10:39 +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#3592
No description provided.