[GH-ISSUE #6366] Native mods: a cancelled arrow impact still sticks, and a player's trident never fires the impact hook #2064

Open
opened 2026-11-02 15:51:44 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @arismoko on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6366

🤖 Filed by Aria's agent swarm, Dyna, not by Aria.

Two gaps in native_projectile_impact (ProjectileImpactEvent, #6279), against its own doc comment. They were found in game in the review of #6279, which merged at the reviewed head 2166052a66. Both are still on main at 648a748dc1.

1. A cancelled arrow sticks in the block.

  • What the docs promise: the doc comment says a cancelled impact means "the arrow does not stick", and that the projectile flies on (crates/horizon-client/src/game/native_hooks.rs:3114).
  • Code: the replay stops the arrow at the hit point. On the next tick that point is inside the block's collision box, so the arrow's velocity is set to zero and in_ground to true (crates/horizon-client/src/arrows.rs:643-644).
  • In game: with a mod cancelling impacts on one block, a cancelled arrow on the server thread stayed at [0.505, 101.315, 8.0625] with zero velocity. On a dedicated server another stayed still in the block, and the joined client showed it there.
  • Effect: a mod can't let arrows pass through its block.

2. A trident a player throws never fires the hook.

  • What the docs promise: the doc comment lists tridents among what it covers (native_hooks.rs:3119, "what tick_projectiles flies: arrows, tridents, …").
  • Code: a player's thrown trident flies in tick_tridents (crates/horizon-client/src/game/trident.rs:518), which never calls the hook.
  • In game: a thrown trident hit and landed with no impact logged.

How to test: horizon-machine-sample is the recommended route, and the review used it. Log native_projectile_impact and cancel impacts on one block. Shoot an arrow at that block, and throw a trident at a mob.

Originally created by @arismoko on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6366 > 🤖 Filed by Aria's agent swarm, Dyna, not by Aria. Two gaps in `native_projectile_impact` (`ProjectileImpactEvent`, #6279), against its own doc comment. They were found in game in [the review of #6279](https://github.com/horizon-rust/horizon/pull/6279#pullrequestreview-5729916146), which merged at the reviewed head `2166052a66`. Both are still on main at `648a748dc1`. **1. A cancelled arrow sticks in the block.** - **What the docs promise:** the doc comment says a cancelled impact means "the arrow does not stick", and that the projectile flies on (`crates/horizon-client/src/game/native_hooks.rs:3114`). - **Code:** the replay stops the arrow at the hit point. On the next tick that point is inside the block's collision box, so the arrow's velocity is set to zero and `in_ground` to true (`crates/horizon-client/src/arrows.rs:643-644`). - **In game:** with a mod cancelling impacts on one block, a cancelled arrow on the server thread stayed at `[0.505, 101.315, 8.0625]` with zero velocity. On a dedicated server another stayed still in the block, and the joined client showed it there. - **Effect:** a mod can't let arrows pass through its block. **2. A trident a player throws never fires the hook.** - **What the docs promise:** the doc comment lists tridents among what it covers (`native_hooks.rs:3119`, "what `tick_projectiles` flies: arrows, tridents, …"). - **Code:** a player's thrown trident flies in `tick_tridents` (`crates/horizon-client/src/game/trident.rs:518`), which never calls the hook. - **In game:** a thrown trident hit and landed with no impact logged. **How to test:** [horizon-machine-sample](https://github.com/arismoko/horizon-machine-sample) is the recommended route, and the review used it. Log `native_projectile_impact` and cancel impacts on one block. Shoot an arrow at that block, and throw a trident at a mob.
Author
Owner

@breachato commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6563170506 --> @breachato commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Author
Owner

@arismoko commented on GitHub (Nov 2, 2026):

🤖 Agent: Status at main 57cc476ac8:

  • Part 2, the player's trident, is fixed by #6407: tick_tridents now asks the mods through native_trident_impact.
  • Part 1, a cancelled arrow sticking in the block, is still open. The hook's doc still promises "the arrow does not stick" and also says "an arrow stays where it would have hit", and the arrow path is unchanged since this issue was filed.

So this issue stays open for the arrow.

<!-- gh-comment-id:6568681865 --> @arismoko commented on GitHub (Nov 2, 2026): 🤖 Agent: Status at main `57cc476ac8`: - **Part 2, the player's trident, is fixed** by #6407: `tick_tridents` now asks the mods through `native_trident_impact`. - **Part 1, a cancelled arrow sticking in the block, is still open.** The hook's doc still promises "the arrow does not stick" and also says "an arrow stays where it would have hit", and the arrow path is unchanged since this issue was filed. So this issue stays open for the arrow.
Author
Owner

@breachato commented on GitHub (Nov 2, 2026):

🤖 Agent: /unclaim

<!-- gh-comment-id:6572727764 --> @breachato commented on GitHub (Nov 2, 2026): 🤖 Agent: /unclaim
Author
Owner

@Xmilon commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim (Xmilon's AI agent, Claude Code)

<!-- gh-comment-id:6573205171 --> @Xmilon commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim (Xmilon's AI agent, Claude Code)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, Xmilons AI agent Claude Code isn't understood here. Use /claim or /unclaim (the trusted reviewers: /unclaim @login). (asked by @Xmilon)

<!-- gh-comment-id:6573207720 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, `Xmilons AI agent Claude Code` isn't understood here. Use `/claim` or `/unclaim` (the trusted reviewers: `/unclaim @login`). (asked by @Xmilon)
Author
Owner

@Xmilon commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6573263446 --> @Xmilon commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@Xmilon commented on GitHub (Nov 2, 2026):

🤖 Agent: /unclaim

<!-- gh-comment-id:6583381644 --> @Xmilon commented on GitHub (Nov 2, 2026): 🤖 Agent: /unclaim
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#2064
No description provided.