[PR #883] [MERGED] LAN: pressure plates, tripwires and detector rails see guests #2885

Closed
opened 2026-11-02 15:59:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/lan-guest-pressure-plates


📝 Commits (1)

  • 159a5df LAN: pressure plates, tripwires and detector rails see the guests

📊 Changes

3 files changed (+63 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+18 -5)
📝 crates/horizon-client/src/game/lan_mobs.rs (+20 -0)
📝 tools/lan_e2e.py (+25 -2)

📄 Description

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

Part of #848 (reported by Tydragon00): "pressure plates don't trigger for the guest".

What

  • Plates, tripwires and detector rails count the guests (Entity.checkInsideBlocks, Level.getEntities) in the level, except spectators (Entity.isIgnoringBlockTriggers). Each guest gets a 0.6-wide box, 1.8 tall or 1.5 when sneaking. Before this, the host counted only its own player and minecarts.
  • Not in this PR: with --server-thread (and on a dedicated server) no block ticks run at all, because tick_blocks returns early without a local player. A plate there is never pressed. That is filed as #890. A fix that ticked around the guests made dedicated_server parity differ on two chunks, so it needs its own vanilla timing work.

Tested

New check plates in tools/lan_e2e.py: the guest steps on a stone pressure plate and off again. Both sides see it powered, then unpowered. It fails on main and passes here without --server-thread. With --server-thread it fails until #890 is fixed.

Self-check

  • cargo fmt --all -- --check: clean.
  • cargo clippy --workspace --all-targets -- -D warnings: clean on this branch.
  • cargo test -p horizon-client -p horizon-protocol: 1019 passed, 0 failed. This ran on an integration commit of the seven #848 / #803 PRs merged together.
  • tools/lan_e2e.py, on that integration build:
    • The #848 / #803 checks (pvp hurt containers machines brewing chest clicks eat eating xp swings plates time light sleep) all pass without --server-thread.
    • With --server-thread, all pass except light, which fails on main too, and plates (#890). plates passed with --server-thread only with the block tick change, since taken out of this PR.
    • plates fails on main.
  • Full tools/lan_e2e.py suite compared with main (e508a5ce binaries), with --server-thread:
    • Main fails self walls crafting sign pvp trials xp light.
    • The integration fails self walls crafting sign pvp trials. These fail on main too.
  • Full suite without --server-thread: later checks are order-dependent on main as well, and main fails clicks sleep push. After an earlier check, the guest's client and the server can disagree on where the guest stands, so later interactions are out of reach.
  • tools/parity.py --changed origin/main (95 harnesses) is running on the integration commit. The result will follow in a comment.

🤖 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/883 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/lan-guest-pressure-plates` --- ### 📝 Commits (1) - [`159a5df`](https://github.com/horizon-rust/horizon/commit/159a5dfa5f0c800de5fb8576c808f5e8315e64cd) LAN: pressure plates, tripwires and detector rails see the guests ### 📊 Changes **3 files changed** (+63 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+18 -5) 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+20 -0) 📝 `tools/lan_e2e.py` (+25 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of #848 (reported by Tydragon00): "pressure plates don't trigger for the guest". ## What - **Plates, tripwires and detector rails count the guests** (`Entity.checkInsideBlocks`, `Level.getEntities`) in the level, except spectators (`Entity.isIgnoringBlockTriggers`). Each guest gets a 0.6-wide box, 1.8 tall or 1.5 when sneaking. Before this, the host counted only its own player and minecarts. - **Not in this PR:** with `--server-thread` (and on a dedicated server) no block ticks run at all, because `tick_blocks` returns early without a local player. A plate there is never pressed. That is filed as #890. A fix that ticked around the guests made `dedicated_server` parity differ on two chunks, so it needs its own vanilla timing work. ## Tested New check `plates` in `tools/lan_e2e.py`: the guest steps on a stone pressure plate and off again. Both sides see it powered, then unpowered. It fails on main and passes here without `--server-thread`. With `--server-thread` it fails until #890 is fixed. ## Self-check - `cargo fmt --all -- --check`: clean. - `cargo clippy --workspace --all-targets -- -D warnings`: clean on this branch. - `cargo test -p horizon-client -p horizon-protocol`: 1019 passed, 0 failed. This ran on an integration commit of the seven #848 / #803 PRs merged together. - `tools/lan_e2e.py`, on that integration build: - The #848 / #803 checks (`pvp hurt containers machines brewing chest clicks eat eating xp swings plates time light sleep`) all pass without `--server-thread`. - With `--server-thread`, all pass except `light`, which fails on main too, and `plates` (#890). `plates` passed with `--server-thread` only with the block tick change, since taken out of this PR. - `plates` fails on main. - Full `tools/lan_e2e.py` suite compared with main (e508a5ce binaries), with `--server-thread`: - Main fails `self walls crafting sign pvp trials xp light`. - The integration fails `self walls crafting sign pvp trials`. These fail on main too. - Full suite without `--server-thread`: later checks are order-dependent on main as well, and main fails `clicks sleep push`. After an earlier check, the guest's client and the server can disagree on where the guest stands, so later interactions are out of reach. - `tools/parity.py --changed origin/main` (95 harnesses) is running on the integration commit. The result will follow in a comment. 🤖 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-02 15:59:50 +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#2885
No description provided.