[PR #4697] [MERGED] Floating kick: a chunk not loaded yet is not air #5787

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

📋 Pull Request Information

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

Base: main ← Head: fix/floating-unloaded-chunks


📝 Commits (1)

  • 0d0e9d4 Floating kick: a chunk not loaded yet is not air around the player

📊 Changes

1 file changed (+8 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/lan/hub.rs (+8 -3)

📄 Description

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

#4622 (@levzzz5154) added vanilla's floating kick. Its no_blocks_around reads every block through World::block, which returns air for a chunk the server hasn't loaded yet. A survival player's first move after joining a dedicated server can arrive before the spawn chunks are generated. That move counts as floating, nothing clears it, and 80 ticks later the player is kicked with "Flying is not enabled on this server". Vanilla loads the chunks it reads, so it sees the ground.

The fix: a chunk that isn't loaded yet doesn't count as air (world.loaded(x, z) && …all air).

It showed up in #4526's parity run: cursor_death and pearl_death failed with Alice step=joins disconnected Flying is not enabled on this server. On main they fail about every other run locally. With this change they pass 6/6.

The 34 harnesses parity.py --changed names are running on the Mac mini; I'll post the result here.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at b5b451de7, 8 min 3 s)

Check Result
Scope ✅ 1 files, +8 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 482 passed (1 min 23 s)
rustfmt ✅ (4 s)
clippy ✅ (1 min 58 s)
tests: horizon-client ✅ 1150 passed (4 min 6 s)
doc tests ✅ 0 passed (1 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 ➖ 34 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 22 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/4697 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/floating-unloaded-chunks` --- ### 📝 Commits (1) - [`0d0e9d4`](https://github.com/horizon-rust/horizon/commit/0d0e9d4213bf1ac45e85941e08edc4dae26e26dc) Floating kick: a chunk not loaded yet is not air around the player ### 📊 Changes **1 file changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/hub.rs` (+8 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. #4622 (@levzzz5154) added vanilla's floating kick. Its `no_blocks_around` reads every block through `World::block`, which returns air for a chunk the server hasn't loaded yet. A survival player's first move after joining a dedicated server can arrive before the spawn chunks are generated. That move counts as floating, nothing clears it, and 80 ticks later the player is kicked with "Flying is not enabled on this server". Vanilla loads the chunks it reads, so it sees the ground. The fix: a chunk that isn't loaded yet doesn't count as air (`world.loaded(x, z) && …all air`). It showed up in #4526's parity run: `cursor_death` and `pearl_death` failed with `Alice step=joins disconnected Flying is not enabled on this server`. On main they fail about every other run locally. With this change they pass 6/6. The 34 harnesses `parity.py --changed` names are running on the Mac mini; I'll post the result here. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at b5b451de7, 8 min 3 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +8 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 482 passed (1 min 23 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (1 min 58 s) | | tests: horizon-client | ✅ 1150 passed (4 min 6 s) | | doc tests | ✅ 0 passed (1 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 | ➖ 34 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 22 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 05:14:59 +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#5787
No description provided.