[PR #5545] [MERGED] Anticheat ground: a claim on what is under the move's start stands (vanilla's Y-first collision) #6346

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

📋 Pull Request Information

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

Base: main ← Head: fix/anticheat-ground-ystart


📝 Commits (1)

  • 75e8a96 Anticheat ground: a claim on what is under the move's start stands

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/lan/anticheat.rs (+6 -1)

📄 Description

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

Fixes #5515: ground flagged honest players on every step down, and since #5495 it kicks at VL 30 and bans at the second kick.

Why

Entity.move resolves Y first, where the body starts, then X and Z. On the tick a player walks off an edge, or lands on a block's edge and slides off it, the vanilla client is on the ground while only air is under the feet at the move's end. ground judged the end position only, so it flagged once per step down any slope or staircase: enough to push a player running down a long one to the kick, then a ban.

Change

anticheat_ground also holds a ground claim when the ground holds at the move's start X and Z, at the new height: exactly the column vanilla's Y pass collides in. A no-fall or jesus has nothing there either (air or water), so they are still caught. 6 lines in lan/anticheat.rs; no per-tick cost when the claim already holds at the end (the extra lookup runs only on a claim that would otherwise fail).

Evidence

  • Before, an instrumented 25-minute soak with the real vanilla 26.3 client (a VanillaMover printing every tick it stands and the blocks under its feet, server-side a line per ground flag), wandering generated terrain with 20–120 ms jitter: 117 ground flags, all 117 matched to this: 104 walk-offs at the same height, 13 landings that slid off an edge.
  • After, the same soak with this fix: the vanilla client wandered 25 min on generated terrain (20-120 ms jitter), 694 blocks, spread to new ground 7 times: never flagged. 0 ground flags over 4,286 standing ticks.
  • tools/anticheat_e2e.py --check ground (default thresholds, real dedicated server):
    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
    

The soak driver and the instrumentation stay out of this PR (debug only); the soak driver comes as its own PR.

Clean-room: vanilla 26.3 only (Entity.move, Entity.collide), no other project's code.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at a4873dec4, 14 min 42 s)

Check Result
Scope ✅ 1 files, +6 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 510 passed (2 min 0 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 36 s)
tests: horizon-client ❌ 1555 passed, 13 failed (10 min 20 s): all 13 in lan_bot, the same that fail on main a4873dec4 without this PR (#5505, minecraft:dialog)
doc tests ✅ 0 passed (3 s)
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 ➖ 39 affected, to run in CI (--quick): blending, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, held_item_stack and 27 more

🤖 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/5545 **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:** `fix/anticheat-ground-ystart` --- ### 📝 Commits (1) - [`75e8a96`](https://github.com/horizon-rust/horizon/commit/75e8a96ca2bec39659d14074a380028f01a94d40) Anticheat ground: a claim on what is under the move's start stands ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/anticheat.rs` (+6 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #5515: `ground` flagged honest players on every step down, and since #5495 it kicks at VL 30 and bans at the second kick. ## Why `Entity.move` resolves Y first, where the body starts, then X and Z. On the tick a player walks off an edge, or lands on a block's edge and slides off it, the vanilla client is on the ground while only air is under the feet at the move's end. `ground` judged the end position only, so it flagged once per step down any slope or staircase: enough to push a player running down a long one to the kick, then a ban. ## Change `anticheat_ground` also holds a ground claim when the ground holds at the move's **start** X and Z, at the new height: exactly the column vanilla's Y pass collides in. A no-fall or jesus has nothing there either (air or water), so they are still caught. 6 lines in `lan/anticheat.rs`; no per-tick cost when the claim already holds at the end (the extra lookup runs only on a claim that would otherwise fail). ## Evidence - **Before**, an instrumented 25-minute soak with the real vanilla 26.3 client (a `VanillaMover` printing every tick it stands and the blocks under its feet, server-side a line per ground flag), wandering generated terrain with 20–120 ms jitter: 117 `ground` flags, **all 117 matched** to this: 104 walk-offs at the same height, 13 landings that slid off an edge. - **After**, the same soak with this fix: `the vanilla client wandered 25 min on generated terrain (20-120 ms jitter), 694 blocks, spread to new ground 7 times: never flagged`. 0 `ground` flags over 4,286 standing ticks. - `tools/anticheat_e2e.py --check ground` (default thresholds, real dedicated server): ``` 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 ``` The soak driver and the instrumentation stay out of this PR (debug only); the soak driver comes as its own PR. Clean-room: vanilla 26.3 only (`Entity.move`, `Entity.collide`), no other project's code. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at a4873dec4, 14 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +6 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (2 min 0 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 36 s) | | tests: horizon-client | ❌ 1555 passed, 13 failed (10 min 20 s): all 13 in `lan_bot`, the same that fail on main a4873dec4 without this PR (#5505, `minecraft:dialog`) | | doc tests | ✅ 0 passed (3 s) | | 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 | ➖ 39 affected, to run in CI (--quick): blending, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, held_item_stack and 27 more | 🤖 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:54 +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#6346
No description provided.