[PR #97] [MERGED] SMP 0.9.0: a sidebar of the richest players, /sidebar on|off, the Tab list's header and footer #104

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

📋 Pull Request Information

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

Base: main ← Head: feat/smp-board


📝 Commits (10+)

  • b9bd159 SMP: places (spawn, homes, warps, /tpa) and /rules
  • 26079e7 SMP places: hook points API 16, and the proof waits for each answer
  • 0eb6ca7 SMP places: hook points API 18 (main took 16 and 17)
  • 1ec378a SMP places: hook points API 21 (main's mod screens took 18 to 20)
  • 63f2fa9 SMP places: pinned to horizon main with #4610 (API 21)
  • ec056f9 SMP: land claims (/claim, /trust) on the block hooks
  • 803907a SMP: keep water, fire, pistons, explosions, buckets and blows out of claims (hooks 22)
  • b0e3d98 SMP claims: pinned to horizon#4739's head (API 22)
  • aaf6cce SMP claims: pinned to horizon main with #4739 (API 22)
  • 4364dbf Merge remote-tracking branch 'origin/main' into feat/smp-places

📊 Changes

19 files changed (+2607 additions, -35 deletions)

View changed files

📝 native/smp/Cargo.lock (+1 -1)
📝 native/smp/Cargo.toml (+1 -1)
📝 native/smp/README.md (+50 -6)
📝 native/smp/compatibility.json (+2 -2)
➕ native/smp/mixins/smp/attack_entity.rs (+10 -0)
➕ native/smp/mixins/smp/block_spread.rs (+14 -0)
➕ native/smp/mixins/smp/destroy_block.rs (+4 -0)
➕ native/smp/mixins/smp/explosion_detonate.rs (+8 -0)
➕ native/smp/mixins/smp/fill_bucket.rs (+4 -0)
📝 native/smp/mixins/smp/glue.rs (+330 -11)
📝 native/smp/mixins/smp/horizon-mixin.toml (+103 -3)
➕ native/smp/mixins/smp/piston_move.rs (+24 -0)
➕ native/smp/mixins/smp/right_click_block.rs (+4 -0)
➕ native/smp/mixins/smp/smp_board.rs (+439 -0)
➕ native/smp/mixins/smp/smp_claims.rs (+642 -0)
📝 native/smp/mixins/smp/smp_economy.rs (+41 -7)
➕ native/smp/mixins/smp/smp_places.rs (+694 -0)
📝 native/smp/proof.py (+230 -4)
📝 native/smp/src/lib.rs (+6 -0)

📄 Description

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

Stacked on #72 (world guard; with #69, #66). Uses horizon-rust/horizon#5268's helpers (native_sidebar,
native_tab_list, native_tick_stats): API 49 since the stamp horizon-rust/horizon#5390, pinned to horizon main
5272f3a (hooks 49).

What

Ludovic's scoreboard for the official server (SMP 0.9.0):

  • Sidebar: the board.top (10) richest players with their balances (1,250, 125.4k, 3.2M), then a gap and
    your own rank and balance. Rebuilt only when a balance changed (at most every min_seconds, 5)
    or every refresh_seconds (60), and sent only to the players whose lines changed.
  • /sidebar off, /sidebar on, /sidebar: hides it for you or shows it again; kept in board.json.
  • Tab list header and footer: board.tab_header {server}, board.tab_footer TPS {tps} · {players} online,
    every tab_refresh_seconds (5).
  • /baltop [page] was already paged (10 a page).
  • All in config.json's board (sidebar and tab turn either off).

No per-tick cost when idle. The economy keeps a revision counter, bumped on each balance change; the board
compares it once a second. The whole SMP tick now returns after a counter increment on 19 ticks of 20, unless a
teleport is warming up or a trade is open (BUSY).

Proof

native.py proof smp on a dedicated server with Alex and Steve: the new board step reads Steve's sidebar from his
client (horizon:native_sidebar, title "Richest players", 4 lines), screenshots the Tab list, /sidebar off removes
it for Steve and not Alex, /sidebar brings it back, board.json keeps the choice. "ok": true.

Screenshot from Steve's client (sidebar-and-tab.png): the sidebar reads "Richest players · 1. Alex 415 · 2. Steve
400 · You: #2 400" (amounts gold, your name green), and the Tab list "Horizon SMP" over the players and
"TPS 20.0 · 2 online" under them.

cargo test: 5 new tests (short amounts, the ranking with your own line, sidebars sent on join and on change only,
a hidden sidebar after a restart, the Tab list's placeholders).

Cost with 58 bots against the deployed build (SMP 0.8.0): in a comment once the A/B runs finish.

🤖 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-mods/pull/97 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/smp-board` --- ### 📝 Commits (10+) - [`b9bd159`](https://github.com/horizon-rust/horizon-mods/commit/b9bd159dcf76e7e61daac2d4891c20f3612101d1) SMP: places (spawn, homes, warps, /tpa) and /rules - [`26079e7`](https://github.com/horizon-rust/horizon-mods/commit/26079e71ed96ba45f596491777182be1168c5abf) SMP places: hook points API 16, and the proof waits for each answer - [`0eb6ca7`](https://github.com/horizon-rust/horizon-mods/commit/0eb6ca75c36e4fd8a2019844ac151f5bbea7a52b) SMP places: hook points API 18 (main took 16 and 17) - [`1ec378a`](https://github.com/horizon-rust/horizon-mods/commit/1ec378ac96d3f03dd1950d06c447f37b191c2927) SMP places: hook points API 21 (main's mod screens took 18 to 20) - [`63f2fa9`](https://github.com/horizon-rust/horizon-mods/commit/63f2fa9f0169d3470c9cf4bc66043d3b54042b37) SMP places: pinned to horizon main with #4610 (API 21) - [`ec056f9`](https://github.com/horizon-rust/horizon-mods/commit/ec056f9f0291c847b5e76e1bf849c21934fabb31) SMP: land claims (/claim, /trust) on the block hooks - [`803907a`](https://github.com/horizon-rust/horizon-mods/commit/803907aaa5225d3cbe8d990e0b9eb804a8e7dda5) SMP: keep water, fire, pistons, explosions, buckets and blows out of claims (hooks 22) - [`b0e3d98`](https://github.com/horizon-rust/horizon-mods/commit/b0e3d98b52194545ebafbcedc0d8d9ecd3c1002b) SMP claims: pinned to horizon#4739's head (API 22) - [`aaf6cce`](https://github.com/horizon-rust/horizon-mods/commit/aaf6ccefcc8f2983c47a8433b03e9c42b13f5a52) SMP claims: pinned to horizon main with #4739 (API 22) - [`4364dbf`](https://github.com/horizon-rust/horizon-mods/commit/4364dbfba3036c7a6d4327b8010b56f68c9fe9aa) Merge remote-tracking branch 'origin/main' into feat/smp-places ### 📊 Changes **19 files changed** (+2607 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `native/smp/Cargo.lock` (+1 -1) 📝 `native/smp/Cargo.toml` (+1 -1) 📝 `native/smp/README.md` (+50 -6) 📝 `native/smp/compatibility.json` (+2 -2) ➕ `native/smp/mixins/smp/attack_entity.rs` (+10 -0) ➕ `native/smp/mixins/smp/block_spread.rs` (+14 -0) ➕ `native/smp/mixins/smp/destroy_block.rs` (+4 -0) ➕ `native/smp/mixins/smp/explosion_detonate.rs` (+8 -0) ➕ `native/smp/mixins/smp/fill_bucket.rs` (+4 -0) 📝 `native/smp/mixins/smp/glue.rs` (+330 -11) 📝 `native/smp/mixins/smp/horizon-mixin.toml` (+103 -3) ➕ `native/smp/mixins/smp/piston_move.rs` (+24 -0) ➕ `native/smp/mixins/smp/right_click_block.rs` (+4 -0) ➕ `native/smp/mixins/smp/smp_board.rs` (+439 -0) ➕ `native/smp/mixins/smp/smp_claims.rs` (+642 -0) 📝 `native/smp/mixins/smp/smp_economy.rs` (+41 -7) ➕ `native/smp/mixins/smp/smp_places.rs` (+694 -0) 📝 `native/smp/proof.py` (+230 -4) 📝 `native/smp/src/lib.rs` (+6 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #72 (world guard; with #69, #66). Uses horizon-rust/horizon#5268's helpers (`native_sidebar`, `native_tab_list`, `native_tick_stats`): API 49 since the stamp horizon-rust/horizon#5390, pinned to horizon main `5272f3a` (hooks 49). ## What Ludovic's scoreboard for the official server (SMP 0.9.0): - **Sidebar**: the `board.top` (10) richest players with their balances (`1,250`, `125.4k`, `3.2M`), then a gap and your own rank and balance. Rebuilt only when a balance changed (at most every `min_seconds`, 5) or every `refresh_seconds` (60), and sent only to the players whose lines changed. - **`/sidebar off`**, `/sidebar on`, `/sidebar`: hides it for you or shows it again; kept in `board.json`. - **Tab list** header and footer: `board.tab_header` `{server}`, `board.tab_footer` `TPS {tps} · {players} online`, every `tab_refresh_seconds` (5). - `/baltop [page]` was already paged (10 a page). - All in `config.json`'s `board` (`sidebar` and `tab` turn either off). **No per-tick cost when idle.** The economy keeps a revision counter, bumped on each balance change; the board compares it once a second. The whole SMP tick now returns after a counter increment on 19 ticks of 20, unless a teleport is warming up or a trade is open (`BUSY`). ## Proof `native.py proof smp` on a dedicated server with Alex and Steve: the new `board` step reads Steve's sidebar from his client (`horizon:native_sidebar`, title "Richest players", 4 lines), screenshots the Tab list, `/sidebar off` removes it for Steve and not Alex, `/sidebar` brings it back, `board.json` keeps the choice. `"ok": true`. Screenshot from Steve's client (`sidebar-and-tab.png`): the sidebar reads "Richest players · 1. Alex 415 · 2. Steve 400 · You: #2 400" (amounts gold, your name green), and the Tab list "Horizon SMP" over the players and "TPS 20.0 · 2 online" under them. `cargo test`: 5 new tests (short amounts, the ranking with your own line, sidebars sent on join and on change only, a hidden sidebar after a restart, the Tab list's placeholders). Cost with 58 bots against the deployed build (SMP 0.8.0): in a comment once the A/B runs finish. 🤖 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:03:15 +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-mods#104
No description provided.