[PR #5358] [MERGED] Let a bobber spring back off a wall #6236

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

📋 Pull Request Information

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

Base: main ← Head: fix/fishing-hook-rebound


📝 Commits (2)

📊 Changes

1 file changed (+43 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/fishing.rs (+43 -1)

📄 Description

FishingHook.onHitBlock sets the hook's velocity to getDeltaMovement().normalize().scale(hit.distanceTo(this)), and HitResult.distanceTo is the squared distance — so for a sub-block step the bobber springs back a short way instead of stopping flush against the wall. Horizon's hook had no block branch at all in its flying state.

The clip is the trident's, verbatim; the rebound is one small function. The rebounded velocity falls through to the existing gravity/move/settle tail, which is vanilla's order, so the shorter step survives the tick.

Proven: the new test passes on a build box, pinning the squared-distance arithmetic.

Not proven: nothing in a game — the check is casting a rod at a wall and watching the bobber stop short and spring back.

Known and untouched: the client-side prediction in client_hook_step still has no block clip (it now steps with the server's already-rebounded velocity, so the visible blip is at most the tracker interval), and the hook still does not trigger onProjectileHit block behaviour such as ringing a bell.


🔄 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/5358 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/fishing-hook-rebound` --- ### 📝 Commits (2) - [`53e6cc2`](https://github.com/horizon-rust/horizon/commit/53e6cc2d3569a2b194351aa2b19d25e17edd8817) Let a bobber spring back off a wall - [`eadf81b`](https://github.com/horizon-rust/horizon/commit/eadf81b7aee5343b5ca90146c2ef3d3368bd6122) Merge main into #5358 ### 📊 Changes **1 file changed** (+43 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fishing.rs` (+43 -1) </details> ### 📄 Description FishingHook.onHitBlock sets the hook's velocity to getDeltaMovement().normalize().scale(hit.distanceTo(this)), and HitResult.distanceTo is the **squared** distance — so for a sub-block step the bobber springs back a short way instead of stopping flush against the wall. Horizon's hook had no block branch at all in its flying state. The clip is the trident's, verbatim; the rebound is one small function. The rebounded velocity falls through to the existing gravity/move/settle tail, which is vanilla's order, so the shorter step survives the tick. **Proven:** the new test passes on a build box, pinning the squared-distance arithmetic. **Not proven:** nothing in a game — the check is casting a rod at a wall and watching the bobber stop short and spring back. Known and untouched: the client-side prediction in client_hook_step still has no block clip (it now steps with the server's already-rebounded velocity, so the visible blip is at most the tracker interval), and the hook still does not trigger onProjectileHit block behaviour such as ringing a bell. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:16:11 +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#6236
No description provided.