[PR #6313] [MERGED] Kick the driver of a vehicle that floats too long (boat fly) #6788

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

📋 Pull Request Information

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

Base: main ← Head: fix/vehicle-floating-kick


📝 Commits (1)

  • 1a39a7b Kick the driver of a vehicle that floats too long

📊 Changes

4 files changed (+110 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_vehicles.rs (+27 -2)
📝 crates/horizon-client/src/lan/guest.rs (+12 -0)
📝 crates/horizon-client/src/lan/hub.rs (+28 -9)
📝 crates/horizon-client/tests/lan_bot.rs (+43 -0)

📄 Description

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

Fixes #6223.

The server had no check on vehicle moves beyond vanilla's "moved too quickly" and "moved wrongly", so a boat flown over land (reported on the official server) was never stopped. This ports ServerGamePacketListenerImpl's clientVehicleIsFloating and aboveGroundVehicleTickCount:

  • guest_move_vehicle (handleMoveVehicle): an accepted move floats when it doesn't go down more than 1/32 of a block, the vehicle hadn't come down onto something on its last move (verticalCollisionBelow), the server doesn't allow flight, the mount isn't no-gravity, and only air is in the vehicle's box grown by 0.0625 and stretched 0.55 down (noBlocksAround: water holds a boat up, so boats at sea never float).
  • tick_floating (tickPlayer): a driver whose vehicle floats more than getMaximumFlyingTicks(vehicle) ticks, 160 for a boat (gravity 0.04) and 80 for a horse (0.08), is kicked with multiplayer.disconnect.flying ("... was kicked for floating a vehicle too long!" in the console). Any move that doesn't float, or leaving the vehicle, starts the count again.
  • no_blocks_in is the box test the player's no_blocks_around already used, shared.

The official server runs with allow-flight=false, so this applies there. Like vanilla's, it misses a boat that sinks a little on every move; a vehicle prediction in the anticheat would catch that later.

Test: lan_bot::a_boat_floating_too_long_kicks_its_driver (160 floating ticks pass, the 161st kicks, a non-floating move resets). All 16 lan_bot tests pass. The block below shows one lib test failing (armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation): it's outside this change, it fails the same way on #6226, and CI's verify passed it there. Cargo stopped at that failure, so I ran cargo test -p horizon-client --test lan_bot separately.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 455b6916b, 35 min 13 s)

Check Result
Scope ✅ 4 files, +110 −11
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 586 passed (6 min 8 s)
rustfmt ✅ (1 min 4 s)
clippy ✅ (12 min 0 s)
tests: horizon-client ❌ 1198 passed, 1 failed (14 min 14 s)
doc tests ✅ 0 passed (4 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/6313 **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/vehicle-floating-kick` --- ### 📝 Commits (1) - [`1a39a7b`](https://github.com/horizon-rust/horizon/commit/1a39a7b3caf719fe44c2a09948c0da13ee23811d) Kick the driver of a vehicle that floats too long ### 📊 Changes **4 files changed** (+110 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+27 -2) 📝 `crates/horizon-client/src/lan/guest.rs` (+12 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+28 -9) 📝 `crates/horizon-client/tests/lan_bot.rs` (+43 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #6223. The server had no check on vehicle moves beyond vanilla's "moved too quickly" and "moved wrongly", so a boat flown over land (reported on the official server) was never stopped. This ports `ServerGamePacketListenerImpl`'s `clientVehicleIsFloating` and `aboveGroundVehicleTickCount`: - `guest_move_vehicle` (handleMoveVehicle): an accepted move floats when it doesn't go down more than 1/32 of a block, the vehicle hadn't come down onto something on its last move (`verticalCollisionBelow`), the server doesn't allow flight, the mount isn't no-gravity, and only air is in the vehicle's box grown by 0.0625 and stretched 0.55 down (`noBlocksAround`: water holds a boat up, so boats at sea never float). - `tick_floating` (tickPlayer): a driver whose vehicle floats more than `getMaximumFlyingTicks(vehicle)` ticks, 160 for a boat (gravity 0.04) and 80 for a horse (0.08), is kicked with `multiplayer.disconnect.flying` ("... was kicked for floating a vehicle too long!" in the console). Any move that doesn't float, or leaving the vehicle, starts the count again. - `no_blocks_in` is the box test the player's `no_blocks_around` already used, shared. The official server runs with `allow-flight=false`, so this applies there. Like vanilla's, it misses a boat that sinks a little on every move; a vehicle prediction in the anticheat would catch that later. Test: `lan_bot::a_boat_floating_too_long_kicks_its_driver` (160 floating ticks pass, the 161st kicks, a non-floating move resets). All 16 `lan_bot` tests pass. The block below shows one lib test failing (`armor_stand_motion_tests::a_tick_keeps_the_previous_position_for_interpolation`): it's outside this change, it fails the same way on #6226, and CI's verify passed it there. Cargo stopped at that failure, so I ran `cargo test -p horizon-client --test lan_bot` separately. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 455b6916b, 35 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +110 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 586 passed (6 min 8 s) | | rustfmt | ✅ (1 min 4 s) | | clippy | ✅ (12 min 0 s) | | tests: horizon-client | ❌ 1198 passed, 1 failed (14 min 14 s) | | doc tests | ✅ 0 passed (4 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:26:40 +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#6788
No description provided.