[PR #5495] [MERGED] Anticheat: ground acts by default (no-fall, jesus: kick at 30, ban at the second kick) #6320

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

📋 Pull Request Information

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

Base: main ← Head: feat/anticheat-ground-enforce


📝 Commits (1)

  • 6ca8da1 Anticheat: ground acts by default (kick at 30, ban at the second kick)

📊 Changes

5 files changed (+42 additions, -25 deletions)

View changed files

📝 crates/horizon-anticheat/src/lib.rs (+13 -5)
📝 crates/horizon-client/src/lan/anticheat.rs (+5 -0)
📝 crates/horizon-server/src/config.rs (+3 -3)
📝 docs/anticheat.md (+7 -5)
📝 tools/anticheat_e2e.py (+14 -12)

📄 Description

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

Fixes #5444. Stacked on #5365 (the bans); it retargets to main once #5365 merges. Its own change is the last commit.

Why

The official server ran the anticheat log-only for its first two hours (10-31, 17:08–19:22Z, 67 players). A player reported for cheating (fly, no-fall, walking on water; 15 of vanilla's "floating too long" kicks) reached a ground level of 2517, and the anticheat never acted on it: ground only logged. Its log, read-only:

peak ground level
every player not flying or walking on water (60) ≤ 7.0 (4 claims standing still in one second, after a long teleport); next 5.0
the 7 who were (claims every tick while rising or falling through the air, or walking on water; 5 of them also kicked by vanilla's floating check) 113, 228, 300, 1463, 1818, 2517, 3749

What changes

  • ground acts by default: setback = 10, alert = 15, kick = 30, ban_after = 2.
    • A false claim is dropped (vanilla's fall damage follows) and the player is sent back.
    • A player who keeps at it is kicked: in an air or fluid stretch, the level rises by one per tick and loses 2 a second.
    • The second kick bans, through #5365.
  • A claim made standing still isn't judged. There's no fall to skip; hovering is vanilla's floating kick. This was the 7.0 case.
  • Replay of the live log with these rules. The others peak at 5.0, a 6× margin under the kick. The seven are kicked and then banned, nobody else.
  • timer and prediction still only log.
    • prediction flagged nearly every player live (an operator peaked at 659).
    • timer decays 0.02 a second, so lag bursts add up over a session: one player reached 46.9 from lag alone.

The docs and the server.toml template say so. No per-tick cost: one position comparison per ground claim.

Tests

  • tools/anticheat_e2e.py --check ground now runs at the defaults, with cheat bots that move as the live ones did: a no-fall bot walking 24 blocks up, and a jesus bot walking on water. Both are flagged, their claims dropped, and kicked with kicked (1 of 2 before a ban) in the log; 5 legit bots walking or standing on the ground are never flagged:
    [Anticheat] NoFall0 failed ground (VL 30.5): claims the ground in the air at 0.5 -54.0 0.5, kicked (1 of 2 before a ban)
    [Anticheat] Jesus0 failed ground (VL 30.5): claims the ground on a fluid at 183.1 -60.0 183.1, kicked (1 of 2 before a ban)
    ground: the no-fall and jesus bots are flagged and kicked (1 of 2 before a ban) at the default thresholds; 5 bots on the ground never flagged
    
  • --check combat still passes (kick, then ban, then refused login).
  • Vanilla soak: the real vanilla 26.3 client wandered 25 minutes on generated terrain (seed 20261031: hills, trees, water, caves), behind 20–120 ms of jitter, with ground and timer at their defaults (prediction off). timer never flagged it. ground logged 98 claims (VL 1.0–2.0 each, none higher: no setback, alert or kick), all at whole-block heights in caves where the server had air under the player. That is a block mismatch between the server and the client to find, not a cheat; I'm on it next. Until it's fixed, the margins hold: the vanilla client peaked at 2.0 and live players at 5.0, against a setback at 10, a kick at 30, and a ban only at the second kick.
  • horizon-anticheat tests (20), horizon-server (77), lan:: (113), clippy -D warnings, rustfmt, Python tests (505): pass.

Clean-room: vanilla 26.3 only (ServerGamePacketListenerImpl's floating check for the hover case), no other project's code.

🤖 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/5495 **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/anticheat-ground-enforce` --- ### 📝 Commits (1) - [`6ca8da1`](https://github.com/horizon-rust/horizon/commit/6ca8da1acedf52a0f15de4edb2790537ca9c3b79) Anticheat: ground acts by default (kick at 30, ban at the second kick) ### 📊 Changes **5 files changed** (+42 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-anticheat/src/lib.rs` (+13 -5) 📝 `crates/horizon-client/src/lan/anticheat.rs` (+5 -0) 📝 `crates/horizon-server/src/config.rs` (+3 -3) 📝 `docs/anticheat.md` (+7 -5) 📝 `tools/anticheat_e2e.py` (+14 -12) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #5444. Stacked on #5365 (the bans); it retargets to main once #5365 merges. Its own change is the last commit. ## Why The official server ran the anticheat log-only for its first two hours (10-31, 17:08–19:22Z, 67 players). A player reported for cheating (fly, no-fall, walking on water; 15 of vanilla's "floating too long" kicks) reached a `ground` level of **2517**, and the anticheat never acted on it: `ground` only logged. Its log, read-only: | | peak `ground` level | | --- | --- | | every player not flying or walking on water (60) | ≤ 7.0 (4 claims standing still in one second, after a long teleport); next 5.0 | | the 7 who were (claims every tick while rising or falling through the air, or walking on water; 5 of them also kicked by vanilla's floating check) | 113, 228, 300, 1463, 1818, 2517, 3749 | ## What changes - **`ground` acts by default:** `setback = 10`, `alert = 15`, `kick = 30`, `ban_after = 2`. - A false claim is dropped (vanilla's fall damage follows) and the player is sent back. - A player who keeps at it is kicked: in an air or fluid stretch, the level rises by one per tick and loses 2 a second. - The second kick bans, through #5365. - **A claim made standing still isn't judged.** There's no fall to skip; hovering is vanilla's floating kick. This was the 7.0 case. - **Replay of the live log with these rules.** The others peak at 5.0, a 6× margin under the kick. The seven are kicked and then banned, nobody else. - **`timer` and `prediction` still only log.** - `prediction` flagged nearly every player live (an operator peaked at 659). - `timer` decays 0.02 a second, so lag bursts add up over a session: one player reached 46.9 from lag alone. The docs and the `server.toml` template say so. No per-tick cost: one position comparison per ground claim. ## Tests - `tools/anticheat_e2e.py --check ground` now runs at the **defaults**, with cheat bots that move as the live ones did: a no-fall bot walking 24 blocks up, and a jesus bot walking on water. Both are flagged, their claims dropped, and kicked with `kicked (1 of 2 before a ban)` in the log; 5 legit bots walking or standing on the ground are never flagged: ``` [Anticheat] NoFall0 failed ground (VL 30.5): claims the ground in the air at 0.5 -54.0 0.5, kicked (1 of 2 before a ban) [Anticheat] Jesus0 failed ground (VL 30.5): claims the ground on a fluid at 183.1 -60.0 183.1, kicked (1 of 2 before a ban) ground: the no-fall and jesus bots are flagged and kicked (1 of 2 before a ban) at the default thresholds; 5 bots on the ground never flagged ``` - `--check combat` still passes (kick, then ban, then refused login). - **Vanilla soak:** the real vanilla 26.3 client wandered 25 minutes on generated terrain (seed 20261031: hills, trees, water, caves), behind 20–120 ms of jitter, with `ground` and `timer` at their defaults (prediction off). `timer` never flagged it. **`ground` logged 98 claims** (VL 1.0–2.0 each, none higher: no setback, alert or kick), all at whole-block heights in caves where the server had air under the player. That is a block mismatch between the server and the client to find, not a cheat; I'm on it next. Until it's fixed, the margins hold: the vanilla client peaked at 2.0 and live players at 5.0, against a setback at 10, a kick at 30, and a ban only at the second kick. - `horizon-anticheat` tests (20), `horizon-server` (77), `lan::` (113), clippy `-D warnings`, rustfmt, Python tests (505): pass. Clean-room: vanilla 26.3 only (`ServerGamePacketListenerImpl`'s floating check for the hover case), no other project's code. 🤖 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 06:18:14 +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#6320
No description provided.