[PR #6051] [MERGED] Sculk sensors hear tridents, potions and fishing hooks land #6628

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

📋 Pull Request Information

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

Base: main ← Head: fix/projectile-land-event


📝 Commits (1)

  • 131c146 Sculk sensors hear tridents, potions and fishing hooks land

📊 Changes

4 files changed (+98 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/fishing.rs (+12 -0)
📝 crates/horizon-client/src/game/potions.rs (+9 -0)
📝 crates/horizon-client/src/game/trident.rs (+18 -1)
📝 tools/lan_e2e.py (+59 -0)

📄 Description

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

What and why

Vanilla Projectile.onHit raises PROJECTILE_LAND for every projectile (block hit: at the block centre; entity hit: at the hit location). Horizon raised it only for creatures.projectiles. Added it for the player's thrown tridents (trident.rs), splash/lingering potions (potions.rs) and fishing hooks (fishing.rs). Rockets: dropped, see below.

Fixes #6050

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 (tools/rea_vanilla.py)

Projectile.onHit as above. ThrownTrident, FishingHook override only onHitBlock/onHitEntity; AbstractThrownPotion overrides onHit but calls super.onHit first. FireworkRocketEntity likewise.

Test: tools/lan_e2e.py --check projectile_land (real game)

Throws each item at a wall 11 blocks away; the sensor stands 10 blocks from the thrower, past its 8-block range, so only the landing can power it.

  • With fix: trident, potion, hook all active.
  • Fix reverted: all three inactive, check fails.

Vanilla vs Horizon

Real 26.3 server (summoned): trident powers the sensor at tick 4, splash potion tick 9, arrow 4, nothing summoned never. Horizon: all three active within 80 ticks of the throw (polled every 10 ticks, so no tick-exact number).

Not compared / open

  • Rocket: dropped. The rocket case never failed when reverted and did not pass with the fix either (sensor stayed inactive), so no rocket code is included. Needs its own look.
  • Tick counts on Horizon: not measured. sbs.py runs dedicated servers without a player, so summoned tridents go through the mob-projectile path, which already emitted the event; it cannot exercise the player-trident path changed here.
  • Hook not compared on vanilla (a bobber cannot be summoned). Event position for a hook block hit is the hit point; a trident block hit uses the block centre.

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 c05ef84a5, 3 min 31 s)

Check Result
Scope ✅ 5 files, +98 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 525 passed (36 s)
rustfmt ✅ (18 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 ✅ (17 s)
tests: horizon-client ✅ 1713 passed (2 min 15 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 ➖ 319 affected, to run in CI (--quick): block_removal, boat_paddle_reset, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 307 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/6051 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/projectile-land-event` --- ### 📝 Commits (1) - [`131c146`](https://github.com/horizon-rust/horizon/commit/131c146a59f1a2754a86c12692c09206b53f4565) Sculk sensors hear tridents, potions and fishing hooks land ### 📊 Changes **4 files changed** (+98 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fishing.rs` (+12 -0) 📝 `crates/horizon-client/src/game/potions.rs` (+9 -0) 📝 `crates/horizon-client/src/game/trident.rs` (+18 -1) 📝 `tools/lan_e2e.py` (+59 -0) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why Vanilla Projectile.onHit raises PROJECTILE_LAND for every projectile (block hit: at the block centre; entity hit: at the hit location). Horizon raised it only for creatures.projectiles. Added it for the player's thrown tridents (trident.rs), splash/lingering potions (potions.rs) and fishing hooks (fishing.rs). Rockets: dropped, see below. Fixes #6050 ## 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 (tools/rea_vanilla.py) Projectile.onHit as above. ThrownTrident, FishingHook override only onHitBlock/onHitEntity; AbstractThrownPotion overrides onHit but calls super.onHit first. FireworkRocketEntity likewise. ## Test: tools/lan_e2e.py --check projectile_land (real game) Throws each item at a wall 11 blocks away; the sensor stands 10 blocks from the thrower, past its 8-block range, so only the landing can power it. - With fix: trident, potion, hook all active. - Fix reverted: all three inactive, check fails. ## Vanilla vs Horizon Real 26.3 server (summoned): trident powers the sensor at tick 4, splash potion tick 9, arrow 4, nothing summoned never. Horizon: all three active within 80 ticks of the throw (polled every 10 ticks, so no tick-exact number). ## Not compared / open - Rocket: dropped. The rocket case never failed when reverted and did not pass with the fix either (sensor stayed inactive), so no rocket code is included. Needs its own look. - Tick counts on Horizon: not measured. sbs.py runs dedicated servers without a player, so summoned tridents go through the mob-projectile path, which already emitted the event; it cannot exercise the player-trident path changed here. - Hook not compared on vanilla (a bobber cannot be summoned). Event position for a hook block hit is the hit point; a trident block hit uses the block centre. 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 c05ef84a5, 3 min 31 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +98 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 525 passed (36 s) | | rustfmt | ✅ (18 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 | ✅ (17 s) | | tests: horizon-client | ✅ 1713 passed (2 min 15 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 | ➖ 319 affected, to run in CI (--quick): block_removal, boat_paddle_reset, bulk_section, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 307 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:24:01 +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#6628
No description provided.