[PR #3995] [MERGED] Fishing hook on a server's client moves between the tracker's updates, as FishingHook.tick does #5343

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3995
Author: @xFedeT
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

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


📝 Commits (4)

  • 7f70737 Fishing hook on a server's client: its own movement between the tracker's updates
  • 379ec36 Merge remote-tracking branch 'origin/main' into fix/fishing-hook-smooth
  • 7ca3671 tests: the remote_motion fixture knows the hook motion method
  • 834819d Merge main into fix/fishing-hook-smooth (resolve tools/lan_e2e.py)

📊 Changes

5 files changed (+295 additions, -22 deletions)

View changed files

📝 crates/horizon-client/src/game/fishing.rs (+242 -20)
📝 crates/horizon-client/src/game/remote.rs (+13 -0)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+2 -2)
📝 tests/test_remote_motion.py (+1 -0)
📝 tools/lan_e2e.py (+37 -0)

📄 Description

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

Refs #3781 (the bobber and line part). Checked: no open PR touches the fishing hook. The issue is not claimed in Kira yet (claim limits); I left a comment on it and will claim it when it frees up. It stays Refs because the second symptom, hooked items teleporting while pulled, is not fixed here (see the end).

What and why

On a server (a LAN guest, the single player server thread, any server) the cast bobber moved in jumps: 3 ticks of movement, 2 still ticks, then a jump (steps of 0.34, 0.34, 0.34, 0, 0, 1.35, ...). In vanilla FishingHook.tick runs on the client too: it keeps flying on its own motion between the tracker's updates (every 5 ticks), eased towards the last update by its LinearInterpolationHandler (3 steps, the predicted movement carries the target along: recordMovement/applyPredictedMovement), floats in water, and rides what it hooked. Horizon only eased towards the update and did nothing in between.

Change

  • game/fishing.rs: tick_remote_hooks for the hook a server tracks (this player's and other players'): the interpolation step, then FishingHook's movement (gravity 0.03, collisions, inertia 0.92, water: Bobbing, Hooked follows the hooked entity at 0.8 of its height). HookLerp is the LinearInterpolationHandler; the spawn velocity, SetEntityMotion and the onGround of the move packets feed it. DATA_HOOKED_ENTITY (index 8) now sets the hooked state.
  • game/remote.rs / game/remote_projectiles.rs: route the hook's moves and motion to it.
  • tests/test_remote_motion.py: the fixture stub for the new motion method.

Vanilla reference

FishingHook.tick, Entity.recordMovement, AbstractInterpolationHandler, LinearInterpolationHandler, FishingHook.onSyncedDataUpdated.

Testing

  • New lan_e2e --check hook_smooth (host and guest): after a cast, each of the first 6 ticks of the flight moves the bobber more than 0.05 blocks (steps now 0.94, 0.87, 0.81, 0.75, 0.70, 0.65, 0.57). On main it fails (0.339, 0.339, 0.339, 0.0, 0.0, 1.354, ...). Passed in 3 of 3 runs after the last change.
  • pr_ready --quick (Python 3.12): Python tests, rustfmt and clippy pass; horizon-client tests: 679 pass, 1 fails on main too (entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed, open fix #3851).

Not fixed here

The item part of the report: a hooked dropped item that is reeled in does not move for several ticks and then jumps to the player in one tick (seen in my run: 0.0 for 14 ticks, then a single 1.624 step), as if the client got its position but not its motion. The hook now follows the item correctly (Hooked(item) at 0.8 of its height), but the item's own smoothness is about how a pulled item's motion reaches the client, a separate change.

🤖 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/3995 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/fishing-hook-smooth` --- ### 📝 Commits (4) - [`7f70737`](https://github.com/horizon-rust/horizon/commit/7f707371382ba7aaf0621ae2b9ec3b2914a2eb01) Fishing hook on a server's client: its own movement between the tracker's updates - [`379ec36`](https://github.com/horizon-rust/horizon/commit/379ec36d52274fa0aa8fb0d2d208c7ec82964474) Merge remote-tracking branch 'origin/main' into fix/fishing-hook-smooth - [`7ca3671`](https://github.com/horizon-rust/horizon/commit/7ca3671df3eb5b0ad483828b1721742a81fb6389) tests: the remote_motion fixture knows the hook motion method - [`834819d`](https://github.com/horizon-rust/horizon/commit/834819ddf446478295eada5525f4fa2870c14252) Merge main into fix/fishing-hook-smooth (resolve tools/lan_e2e.py) ### 📊 Changes **5 files changed** (+295 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fishing.rs` (+242 -20) 📝 `crates/horizon-client/src/game/remote.rs` (+13 -0) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+2 -2) 📝 `tests/test_remote_motion.py` (+1 -0) 📝 `tools/lan_e2e.py` (+37 -0) </details> ### 📄 Description > 🤖 Opened by Federico's AI agent (Claude), not by Federico himself. Refs #3781 (the bobber and line part). Checked: no open PR touches the fishing hook. The issue is not claimed in Kira yet (claim limits); I left a comment on it and will claim it when it frees up. It stays `Refs` because the second symptom, hooked items teleporting while pulled, is not fixed here (see the end). ## What and why On a server (a LAN guest, the single player server thread, any server) the cast bobber moved in jumps: 3 ticks of movement, 2 still ticks, then a jump (steps of 0.34, 0.34, 0.34, 0, 0, 1.35, ...). In vanilla `FishingHook.tick` runs on the client too: it keeps flying on its own motion between the tracker's updates (every 5 ticks), eased towards the last update by its `LinearInterpolationHandler` (3 steps, the predicted movement carries the target along: `recordMovement`/`applyPredictedMovement`), floats in water, and rides what it hooked. Horizon only eased towards the update and did nothing in between. ## Change - `game/fishing.rs`: `tick_remote_hooks` for the hook a server tracks (this player's and other players'): the interpolation step, then `FishingHook`'s movement (gravity 0.03, collisions, inertia 0.92, water: `Bobbing`, `Hooked` follows the hooked entity at 0.8 of its height). `HookLerp` is the `LinearInterpolationHandler`; the spawn velocity, `SetEntityMotion` and the `onGround` of the move packets feed it. `DATA_HOOKED_ENTITY` (index 8) now sets the hooked state. - `game/remote.rs` / `game/remote_projectiles.rs`: route the hook's moves and motion to it. - `tests/test_remote_motion.py`: the fixture stub for the new motion method. ## Vanilla reference `FishingHook.tick`, `Entity.recordMovement`, `AbstractInterpolationHandler`, `LinearInterpolationHandler`, `FishingHook.onSyncedDataUpdated`. ## Testing - New `lan_e2e --check hook_smooth` (host and guest): after a cast, each of the first 6 ticks of the flight moves the bobber more than 0.05 blocks (steps now 0.94, 0.87, 0.81, 0.75, 0.70, 0.65, 0.57). On `main` it fails (`0.339, 0.339, 0.339, 0.0, 0.0, 1.354, ...`). Passed in 3 of 3 runs after the last change. - `pr_ready --quick` (Python 3.12): Python tests, rustfmt and clippy pass; `horizon-client` tests: 679 pass, 1 fails on `main` too (`entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed`, open fix #3851). ## Not fixed here The item part of the report: a hooked dropped item that is reeled in does not move for several ticks and then jumps to the player in one tick (seen in my run: `0.0` for 14 ticks, then a single `1.624` step), as if the client got its position but not its motion. The hook now follows the item correctly (`Hooked(item)` at 0.8 of its height), but the item's own smoothness is about how a pulled item's motion reaches the client, a separate change. 🤖 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-03 05:11:56 +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#5343
No description provided.