[PR #4622] [MERGED] Server players: the flying kick and the build limit message told twice #5734

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4622
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/38-srvpkts


📝 Commits (2)

  • 8d82e98 Server players: the floating kick, and the build limit told twice at the top
  • 31300e6 Merge hr/main into parity/38-srvpkts

📊 Changes

8 files changed (+136 additions, -24 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+1 -0)
📝 crates/horizon-client/src/game/integrated.rs (+1 -0)
📝 crates/horizon-client/src/game/lan.rs (+1 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+4 -1)
📝 crates/horizon-client/src/lan/anticheat.rs (+1 -1)
📝 crates/horizon-client/src/lan/guest.rs (+6 -0)
📝 crates/horizon-client/src/lan/hub.rs (+121 -22)
📝 crates/horizon-client/tests/lan_bot.rs (+1 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3520

What and why

  • ServerGamePacketListenerImpl.noBlocksAround: the air test over the player's box grown by 0.0625 and stretched 0.55 down (Hub::no_blocks_around, crates/horizon-client/src/lan/hub.rs).
  • ServerGamePacketListenerImpl.getMaximumFlyingTicks: maximum_flying_ticks(gravity) = ceil(80 * max(0.08 / gravity, 1)), never a kick below 1.0E-5F gravity. Players use the default 0.08 gravity, as the guest has no gravity attribute yet.
  • ServerGamePacketListenerImpl.handlePlayerPositionChange / tickPlayer (the flying kick): an accepted move sets clientIsFloating (no downward step, not standing on something, not a spectator, server allow-flight off, no mayfly, no levitation, not gliding, not riptiding, nothing but air around). Each tick it holds for more than the maximum, the player is kicked with multiplayer.disconnect.flying and the log says "was kicked for floating too long!". Sleeping, riding and dead players reset it. A teleport (ServerPlayer.teleportTo) resets the tick count; a refused move or a resent teleport does not. allow_flight is on HubConfig: MinecraftServer.allowFlight is true except on a dedicated server with allow-flight=false.
  • ServerGamePacketListenerImpl.handleUseItemOn: the build-limit overlay for a failed placement on top of the world is sent twice, as vanilla's two checks do (the bottom is sent once).

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

ServerGamePacketListenerImpl.{noBlocksAround, getMaximumFlyingTicks, tickPlayer, handlePlayerPositionChange, resetFlyingTicks, handleUseItemOn}, Entity.move (verticalCollisionBelow), MinecraftServer.allowFlight, DedicatedServer.allowFlight.

Tests

lan::hub::tests::maximum_flying_ticks_follow_gravity. cargo clippy -p horizon-client --all-targets -D warnings clean. Parity harnesses not run locally (CI).

🤖 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/4622 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/38-srvpkts` --- ### 📝 Commits (2) - [`8d82e98`](https://github.com/horizon-rust/horizon/commit/8d82e986f9ac470712d600c38733cd43e36b9e79) Server players: the floating kick, and the build limit told twice at the top - [`31300e6`](https://github.com/horizon-rust/horizon/commit/31300e6846a89dfaf2e043f85a42c3e620f36890) Merge hr/main into parity/38-srvpkts ### 📊 Changes **8 files changed** (+136 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+1 -0) 📝 `crates/horizon-client/src/game/integrated.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+4 -1) 📝 `crates/horizon-client/src/lan/anticheat.rs` (+1 -1) 📝 `crates/horizon-client/src/lan/guest.rs` (+6 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+121 -22) 📝 `crates/horizon-client/tests/lan_bot.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 ## What and why - `ServerGamePacketListenerImpl.noBlocksAround`: the air test over the player's box grown by 0.0625 and stretched 0.55 down (`Hub::no_blocks_around`, `crates/horizon-client/src/lan/hub.rs`). - `ServerGamePacketListenerImpl.getMaximumFlyingTicks`: `maximum_flying_ticks(gravity)` = ceil(80 * max(0.08 / gravity, 1)), never a kick below 1.0E-5F gravity. Players use the default 0.08 gravity, as the guest has no gravity attribute yet. - `ServerGamePacketListenerImpl.handlePlayerPositionChange` / `tickPlayer` (the flying kick): an accepted move sets `clientIsFloating` (no downward step, not standing on something, not a spectator, server `allow-flight` off, no mayfly, no levitation, not gliding, not riptiding, nothing but air around). Each tick it holds for more than the maximum, the player is kicked with `multiplayer.disconnect.flying` and the log says "was kicked for floating too long!". Sleeping, riding and dead players reset it. A teleport (`ServerPlayer.teleportTo`) resets the tick count; a refused move or a resent teleport does not. `allow_flight` is on `HubConfig`: `MinecraftServer.allowFlight` is true except on a dedicated server with `allow-flight=false`. - `ServerGamePacketListenerImpl.handleUseItemOn`: the build-limit overlay for a failed placement on top of the world is sent twice, as vanilla's two checks do (the bottom is sent once). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `ServerGamePacketListenerImpl.{noBlocksAround, getMaximumFlyingTicks, tickPlayer, handlePlayerPositionChange, resetFlyingTicks, handleUseItemOn}`, `Entity.move` (verticalCollisionBelow), `MinecraftServer.allowFlight`, `DedicatedServer.allowFlight`. ## Tests `lan::hub::tests::maximum_flying_ticks_follow_gravity`. `cargo clippy -p horizon-client --all-targets -D warnings` clean. Parity harnesses not run locally (CI). 🤖 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 05:14:37 +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#5734
No description provided.