[PR #4494] [MERGED] docs/smp.md: the official server's SMP mod and the server hook points it needs #5656

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

📋 Pull Request Information

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

Base: main ← Head: feat/smp-design


📝 Commits (3)

  • 9d0473d docs/smp.md: the SMP layer's design (economy, trades, gambling, organisation)
  • 3f1a453 docs/smp.md: the SMP is a native mod only the official server builds
  • 6f6650a docs/smp.md: players install nothing; trades move nothing until the swap; config.json

📊 Changes

2 files changed (+165 additions, -0 deletions)

View changed files

📝 docs/README.md (+1 -0)
➕ docs/smp.md (+164 -0)

📄 Description

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

What and why

The plan for the official server's survival layer (horizon.bunchy7s.dev): an economy and server market, player trades, games of chance with the in-game currency, and spawn, homes, teleport requests, warps, land claims and rules. This PR is only the design, docs/smp.md.

Scope (Ludovic, 2026-10-30): none of it is in Horizon. The server people download stays a plain server: no SMP command, no [smp] in server.toml, nothing in the release build. The SMP is a native mod (smp, in horizon-rust/horizon-mods native/smp/) that only the official server builds into its engine. Horizon gains general server hook points any native mod can use: a player's command on the server and the command tree, the online players, messages, the acting player's items, the world's folder; later server-opened menus, teleports, damage, and interactions a mod can refuse (reusing #4302 and #4483 where they cover it). The doc lists which points each phase needs, the mod's commands, its config and data (world/horizon-smp/, written atomically, an audit log), Mojang's rules (in-game currency only, never bought or cashed out), the cost, and how the official server's engine is built.

Players install nothing (Ludovic, 2026-10-30). Everything works with a stock Horizon client: chat commands, vanilla chest menus (generic_9x6) filled by the server for the market, /trade and the coinflip, vanilla sounds, titles, the action bar, boss bars and the sidebar. Only the Horizon client may join the official server (anticheat-1's gate); the SMP relies on what the stock client renders, never on a client mod. The trade menu is display only: offered stacks stay in their owners' inventories until one atomic, verified swap, so closing, disconnecting, dying or leaving moves nothing and leaves nothing to duplicate.

Rejected: building it into the engine behind a setting (it would ship to every server); a datapack (no arguments, no inventory transactions, no trade window, no claims).

Kind

  • docs

Vanilla reference

none (docs). Claims will refuse actions where vanilla's spawn protection does (ServerPlayer.mayInteractWith).

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at f6a757ac2, 55 s)

Check Result
Scope ✅ 2 files, +171 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (54 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 2 affected, to run in CI (--quick): lan_integration, lunge_motion
Label skip-release

🤖 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/4494 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/smp-design` --- ### 📝 Commits (3) - [`9d0473d`](https://github.com/horizon-rust/horizon/commit/9d0473d7480d55356fed15f08ed8033fce19e2a8) docs/smp.md: the SMP layer's design (economy, trades, gambling, organisation) - [`3f1a453`](https://github.com/horizon-rust/horizon/commit/3f1a45313ef2071cb432a3c937e89eb6cae1856a) docs/smp.md: the SMP is a native mod only the official server builds - [`6f6650a`](https://github.com/horizon-rust/horizon/commit/6f6650a68f02874fbb3c763b00b9bee220736fa1) docs/smp.md: players install nothing; trades move nothing until the swap; config.json ### 📊 Changes **2 files changed** (+165 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/README.md` (+1 -0) ➕ `docs/smp.md` (+164 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why The plan for the official server's survival layer (horizon.bunchy7s.dev): an economy and server market, player trades, games of chance with the in-game currency, and spawn, homes, teleport requests, warps, land claims and rules. This PR is only the design, `docs/smp.md`. **Scope (Ludovic, 2026-10-30): none of it is in Horizon.** The server people download stays a plain server: no SMP command, no `[smp]` in `server.toml`, nothing in the release build. The SMP is a **native mod** (`smp`, in horizon-rust/horizon-mods `native/smp/`) that only the official server builds into its engine. Horizon gains general **server hook points** any native mod can use: a player's command on the server and the command tree, the online players, messages, the acting player's items, the world's folder; later server-opened menus, teleports, damage, and interactions a mod can refuse (reusing #4302 and #4483 where they cover it). The doc lists which points each phase needs, the mod's commands, its config and data (`world/horizon-smp/`, written atomically, an audit log), Mojang's rules (in-game currency only, never bought or cashed out), the cost, and how the official server's engine is built. **Players install nothing (Ludovic, 2026-10-30).** Everything works with a stock Horizon client: chat commands, vanilla chest menus (`generic_9x6`) filled by the server for the market, `/trade` and the coinflip, vanilla sounds, titles, the action bar, boss bars and the sidebar. Only the Horizon client may join the official server (anticheat-1's gate); the SMP relies on what the stock client renders, never on a client mod. The trade menu is display only: offered stacks stay in their owners' inventories until one atomic, verified swap, so closing, disconnecting, dying or leaving moves nothing and leaves nothing to duplicate. Rejected: building it into the engine behind a setting (it would ship to every server); a datapack (no arguments, no inventory transactions, no trade window, no claims). ## Kind - [x] docs ## Vanilla reference none (docs). Claims will refuse actions where vanilla's spawn protection does (`ServerPlayer.mayInteractWith`). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at f6a757ac2, 55 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +171 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (54 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 2 affected, to run in CI (--quick): lan_integration, lunge_motion | | Label | `skip-release` | 🤖 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:14:07 +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#5656
No description provided.