[PR #316] [MERGED] Fishing: the rod casts, bites splash and bubble, and the line is vanilla's #2484

Closed
opened 2026-11-02 15:56:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/fishing-rod-visuals


📝 Commits (3)

  • 61a127a Fishing: the rod casts, bites splash and bubble, and the line is vanilla's
  • ce4d520 Fishing line: the hand side is a float, as in vanilla
  • 44e21e6 Merge main into feat/fishing-rod-visuals: keep the off-hand renderer, add the cast-rod flag

📊 Changes

5 files changed (+238 additions, -66 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+15 -11)
📝 crates/horizon-client/src/game/fishing.rs (+210 -53)
📝 crates/horizon-client/src/game/item_draw.rs (+3 -0)
📝 crates/horizon-client/src/game/mob_blocks.rs (+7 -0)
📝 crates/horizon-client/src/gfx.rs (+3 -2)

📄 Description

Fixes #265. Thanks to Cosmic (@Online5277) for the report!

What

  • Cast model: the fishing rod switches to fishing_rod_cast while its hook is out (FishingRodCast: the stack in the arm FishingHookRenderer.getHoldingArm picks), in first person, on the player model in third person, and in the hotbar.
  • Particles from FishingHook.catchingFish: splashes where fish tease the bait (2 to 3 splash, 2.5 to 6 blocks away, only over water); while a fish swims up, a fishing particle to each side of its path and a bubble now and then; when it bites, a burst of 6 bubble and 6 fishing around the bobber. Positions, spreads, speeds and random draws follow vanilla (Mth.sin/cos, float rounding, the water check below each fish).
  • Line: vanilla's FishingHookRenderer line, 16 black lines segments of the window's line width (Window.getAppropriateLineWidth, 2.5 px at 1080p), drawn in screen space through the gizmo line pipeline, not as world-space quads 0.025 blocks wide. It sags (a² + a) / 2 from a quarter block above the hook to getPlayerHandPos: on the near plane in first person (FOV option, invert * 0.525, -0.1, swing rotations), beside the body in third person (body yaw, 0.35 to the side, 0.8 forward, crouch offset).
  • Bobber: centred on the hook, not 0.125 above it.

How tested

No parity harness covers the hook or its renderer (tools/parity.py --changed runs what these files touch; results below). In game on the Mac mini (offscreen, horizon-ctl screenshot), in ~/code/horizon-parity/shots/cosmic-227-265-222-221/:

  • fish_0_idle.png and fish_1_cast.png: the rod before and after casting (the string at the rod's tip goes), and the thin line.
  • fish_2_trail0.png: the fishing-particle trail of a fish swimming up.
  • fish_3_bite0.png: the bite burst.
  • fish_4_third_person.png: the cast rod in the model's hand and the line from it.

Self-check (one integration commit of #227, #265 and #222 on origin/main 68ec2236, Mac mini):

cargo fmt --all --check                                        ok
cargo clippy --workspace --all-targets -- -D warnings          ok
cargo test -p horizon-client                                   632 + 38 + 15 + 2 + 2 + 1 passed, 0 failed
python3 tools/parity.py --changed origin/main                  79 passed, 0 failed in 15.3 min
python3 tools/parity.py sound_engine                           PASS (335,665 lines match, 11,167 steps)

Needs Ludovic

Nothing.

🤖 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/316 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/fishing-rod-visuals` --- ### 📝 Commits (3) - [`61a127a`](https://github.com/horizon-rust/horizon/commit/61a127a2a253f68e40af130a4ea8d9a7aff53a55) Fishing: the rod casts, bites splash and bubble, and the line is vanilla's - [`ce4d520`](https://github.com/horizon-rust/horizon/commit/ce4d520f5588fda418807ceff368419f4f36c8db) Fishing line: the hand side is a float, as in vanilla - [`44e21e6`](https://github.com/horizon-rust/horizon/commit/44e21e660158aeb0df005274851909bfe9dd9652) Merge main into feat/fishing-rod-visuals: keep the off-hand renderer, add the cast-rod flag ### 📊 Changes **5 files changed** (+238 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+15 -11) 📝 `crates/horizon-client/src/game/fishing.rs` (+210 -53) 📝 `crates/horizon-client/src/game/item_draw.rs` (+3 -0) 📝 `crates/horizon-client/src/game/mob_blocks.rs` (+7 -0) 📝 `crates/horizon-client/src/gfx.rs` (+3 -2) </details> ### 📄 Description Fixes #265. Thanks to Cosmic (@Online5277) for the report! ## What - **Cast model:** the fishing rod switches to `fishing_rod_cast` while its hook is out (`FishingRodCast`: the stack in the arm `FishingHookRenderer.getHoldingArm` picks), in first person, on the player model in third person, and in the hotbar. - **Particles** from `FishingHook.catchingFish`: splashes where fish tease the bait (2 to 3 `splash`, 2.5 to 6 blocks away, only over water); while a fish swims up, a `fishing` particle to each side of its path and a `bubble` now and then; when it bites, a burst of 6 `bubble` and 6 `fishing` around the bobber. Positions, spreads, speeds and random draws follow vanilla (`Mth.sin`/`cos`, float rounding, the water check below each fish). - **Line:** vanilla's `FishingHookRenderer` line, 16 black `lines` segments of the window's line width (`Window.getAppropriateLineWidth`, 2.5 px at 1080p), drawn in screen space through the gizmo line pipeline, not as world-space quads 0.025 blocks wide. It sags `(a² + a) / 2` from a quarter block above the hook to `getPlayerHandPos`: on the near plane in first person (FOV option, `invert * 0.525, -0.1`, swing rotations), beside the body in third person (body yaw, 0.35 to the side, 0.8 forward, crouch offset). - **Bobber:** centred on the hook, not 0.125 above it. ## How tested No parity harness covers the hook or its renderer (`tools/parity.py --changed` runs what these files touch; results below). In game on the Mac mini (offscreen, `horizon-ctl screenshot`), in `~/code/horizon-parity/shots/cosmic-227-265-222-221/`: - `fish_0_idle.png` and `fish_1_cast.png`: the rod before and after casting (the string at the rod's tip goes), and the thin line. - `fish_2_trail0.png`: the fishing-particle trail of a fish swimming up. - `fish_3_bite0.png`: the bite burst. - `fish_4_third_person.png`: the cast rod in the model's hand and the line from it. Self-check (one integration commit of #227, #265 and #222 on origin/main 68ec2236, Mac mini): ``` cargo fmt --all --check ok cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-client 632 + 38 + 15 + 2 + 2 + 1 passed, 0 failed python3 tools/parity.py --changed origin/main 79 passed, 0 failed in 15.3 min python3 tools/parity.py sound_engine PASS (335,665 lines match, 11,167 steps) ``` ## Needs Ludovic Nothing. 🤖 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-02 15:56:34 +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#2484
No description provided.