[PR #6226] [MERGED] Keep each level's tracked entities with its level (anticheat boat false bans) #6727

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6226
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/anticheat-level-entity-states


📝 Commits (1)

  • 02bc0ca Keep each level's tracked entities with its level

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/levels.rs (+19 -1)

📄 Description

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

Fixes #6222.

On a server with players in several dimensions, each level's moves were checked against the last level's entities. LanHost.states is one buffer that every level pass refills, and tick_lan_packets reads it (the ground check's carriers, move collisions, the prediction's excuses) before the level describes its entities again. With anyone in the Nether or the End, an Overworld player standing on a boat had no boat under them.

On the official server this was the "claims the ground on a fluid at … 63.1 …" class: 1357 claims from 64 players on 2026-11-01, kicks for ZeroTwoXXXX, MayyyBW and 0vi_rim0, and two false bans for isInferno (pardoned). The height is 63.0857639 in every case: a vanilla boat floating in still water (y = 62.889 − 0.65 × 0.5625) plus its 0.5625 height, where vanilla puts a player who gets out of a boat at sea. The players' rejoin positions in the server log are that exact value.

The states now park with their level (Parked.lan_states, swapped in enter_level), like the level's other entity state. A round trip into another level and back (joins, travel, commands) swaps them twice and leaves them in place, even while a tick holds them.

Not covered by a new test: it needs a Game with two live levels, which nothing in the unit tests builds. The dedicated-server harnesses (dedicated_server, server_entities...) run in CI.

The one failing unit test below (armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation, in the client lib) is outside this change, which only touches the game binary's levels.rs.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 975c07d91, 30 min 18 s)

Check Result
Scope ✅ 1 files, +19 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 586 passed (10 min 18 s)
rustfmt ✅ (11 s)
clippy ✅ (8 min 17 s)
tests: horizon-client ❌ 1196 passed, 1 failed (10 min 42 s)
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 ➖ 44 affected, to run in CI (--quick): armor_stand_frost, arrow_wind_charge, block_removal, boat_authority, boat_paddle_reset, boat_submerged, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser and 32 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/6226 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/anticheat-level-entity-states` --- ### 📝 Commits (1) - [`02bc0ca`](https://github.com/horizon-rust/horizon/commit/02bc0cad5438eeccbbf893d12d8022068c1edfd1) Keep each level's tracked entities with its level ### 📊 Changes **1 file changed** (+19 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/levels.rs` (+19 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #6222. On a server with players in several dimensions, each level's moves were checked against the last level's entities. `LanHost.states` is one buffer that every level pass refills, and `tick_lan_packets` reads it (the ground check's carriers, move collisions, the prediction's excuses) before the level describes its entities again. With anyone in the Nether or the End, an Overworld player standing on a boat had no boat under them. On the official server this was the "claims the ground on a fluid at … 63.1 …" class: 1357 claims from 64 players on 2026-11-01, kicks for ZeroTwoXXXX, MayyyBW and 0vi_rim0, and two false bans for isInferno (pardoned). The height is 63.0857639 in every case: a vanilla boat floating in still water (y = 62.889 − 0.65 × 0.5625) plus its 0.5625 height, where vanilla puts a player who gets out of a boat at sea. The players' rejoin positions in the server log are that exact value. The states now park with their level (`Parked.lan_states`, swapped in `enter_level`), like the level's other entity state. A round trip into another level and back (joins, travel, commands) swaps them twice and leaves them in place, even while a tick holds them. Not covered by a new test: it needs a `Game` with two live levels, which nothing in the unit tests builds. The dedicated-server harnesses (`dedicated_server`, `server_entities`...) run in CI. The one failing unit test below (`armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation`, in the client lib) is outside this change, which only touches the game binary's `levels.rs`. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 975c07d91, 30 min 18 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +19 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 586 passed (10 min 18 s) | | rustfmt | ✅ (11 s) | | clippy | ✅ (8 min 17 s) | | tests: horizon-client | ❌ 1196 passed, 1 failed (10 min 42 s) | | 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 | ➖ 44 affected, to run in CI (--quick): armor_stand_frost, arrow_wind_charge, block_removal, boat_authority, boat_paddle_reset, boat_submerged, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser and 32 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:25:41 +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#6727
No description provided.