[PR #6529] [MERGED] Lightning presses wooden pressure plates #6935

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

📋 Pull Request Information

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

Base: main ← Head: fix/plates-remaining-kinds


📝 Commits (2)

  • 99b02b9 Plates and tripwires count lightning bolts
  • b86f3f5 Merge remote-tracking branch 'origin/main' into fix/plates-remaining-kinds

📊 Changes

1 file changed (+23 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+23 -0)

📄 Description

🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself.

What and why

A lightning bolt striking a pressure plate (or tripwire) did not count as something on it. In vanilla it does: BasePressurePlateBlock.getEntityCount and TripWireBlock.checkPressed count every entity except those whose Entity.isIgnoringBlockTriggers() is true, and a lightning bolt is not one of them.

Changed: crates/horizon-client/src/game.rs, the plate and tripwire entity lists now include the bolts in the level (a 0 x 0 box, EntityType.LIGHTNING_BOLT).

Fixes #6527

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

BasePressurePlateBlock.getEntityCount (lambda reads Entity.isIgnoringBlockTriggers), TripWireBlock.checkPressed, Entity.isIgnoringBlockTriggers (false). The only overrides are Marker, OminousItemSpawner, Display, ArmorStand, Interaction and Bat.

Numbers

Side-by-side plates_kinds scene: oak pressure plates (stone ones count only living entities), each pressed by a pig that is then moved away; 18 ticks later the plate's own scheduled recount decides whether it stays on. Lightning bolts summoned on the plate every other tick. State after the recount:

vanilla Horizon before Horizon after
empty plate (control) off off off
item resting on plate (control) on on on
plate under lightning on off on

What wasn't compared

  • Thrown potions, eyes of ender, evoker fangs, potion clouds and dragon breath clouds also do not ignore block triggers in vanilla, but /summon makes inert placeholders of them in Horizon, so they could not be tested headless and are not changed here.
  • Tripwires were not run; they share the entity list with plates.

Proved by script against the real 26.3 server; no human played this change.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on Valhalla, against origin/main at f66168aa2, 3 min 0 s)

Check Result
Scope ✅ 2 files, +23 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 595 passed (25 s)
rustfmt ✅ (6 s)
Rust ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 19 s)
tests: horizon-client ✅ 591 passed (1 min 6 s)
doc tests ✅ 0 passed (2 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 ➖ 332 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, block_particles, block_removal, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, bulk_section, bundle_weight, camera and 320 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.ai/code/session_018zuDTsnyHkP28bzn3u7S3m


🔄 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/6529 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/plates-remaining-kinds` --- ### 📝 Commits (2) - [`99b02b9`](https://github.com/horizon-rust/horizon/commit/99b02b99c8fa42cbe59175382b7260a9ba181bc3) Plates and tripwires count lightning bolts - [`b86f3f5`](https://github.com/horizon-rust/horizon/commit/b86f3f517f70b585ba08fb06d347bcad83506820) Merge remote-tracking branch 'origin/main' into fix/plates-remaining-kinds ### 📊 Changes **1 file changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+23 -0) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why A lightning bolt striking a pressure plate (or tripwire) did not count as something on it. In vanilla it does: `BasePressurePlateBlock.getEntityCount` and `TripWireBlock.checkPressed` count every entity except those whose `Entity.isIgnoringBlockTriggers()` is true, and a lightning bolt is not one of them. Changed: `crates/horizon-client/src/game.rs`, the plate and tripwire entity lists now include the bolts in the level (a 0 x 0 box, `EntityType.LIGHTNING_BOLT`). Fixes #6527 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `BasePressurePlateBlock.getEntityCount` (lambda reads `Entity.isIgnoringBlockTriggers`), `TripWireBlock.checkPressed`, `Entity.isIgnoringBlockTriggers` (false). The only overrides are `Marker`, `OminousItemSpawner`, `Display`, `ArmorStand`, `Interaction` and `Bat`. ## Numbers Side-by-side `plates_kinds` scene: oak pressure plates (stone ones count only living entities), each pressed by a pig that is then moved away; 18 ticks later the plate's own scheduled recount decides whether it stays on. Lightning bolts summoned on the plate every other tick. State after the recount: | | vanilla | Horizon before | Horizon after | |---|---|---|---| | empty plate (control) | off | off | off | | item resting on plate (control) | on | on | on | | plate under lightning | on | off | on | ## What wasn't compared - Thrown potions, eyes of ender, evoker fangs, potion clouds and dragon breath clouds also do not ignore block triggers in vanilla, but `/summon` makes inert placeholders of them in Horizon, so they could not be tested headless and are not changed here. - Tripwires were not run; they share the entity list with plates. Proved by script against the real 26.3 server; no human played this change. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Valhalla, against origin/main at f66168aa2, 3 min 0 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +23 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 595 passed (25 s) | | rustfmt | ✅ (6 s) | | Rust | ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 19 s) | | tests: horizon-client | ✅ 591 passed (1 min 6 s) | | doc tests | ✅ 0 passed (2 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 | ➖ 332 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, block_particles, block_removal, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, bulk_section, bundle_weight, camera and 320 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) https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:29:39 +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#6935
No description provided.