[PR #6888] [MERGED] Fishing rods hook and pull armor stands and boats #7172

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6888
Author: @DUzzL
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/6573-fishing-hook-entities


📝 Commits (2)

📊 Changes

3 files changed (+142 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/fishing.rs (+47 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java (+16 -0)
➕ tools/test_fishing_hook_entities_parity.py (+79 -0)

📄 Description

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

Fixes #6573

What

A fishing bobber now hooks armor stands and boats, and reeling in pulls them toward the player, as in vanilla.

Why

tick_fishing only looked at mobs, players and dropped items. Armor stands and boats live in their own lists, so the bobber flew through them.

Vanilla followed

  • Projectile.canHitEntity, Entity.canBeHitByProjectile (isAlive() && isPickable()), ArmorStand.isPickable (false for a marker), AbstractBoat.isPickable
  • FishingHook.onHitEntity (hook rides the entity at 0.8 of its height), FishingHook.pullEntity (0.1 of the way to the owner)
  • Approximation: the boat the owner rides is never hooked. Vanilla allows it only once leftOwner is set, which a bobber near the boat does not reach.

Evidence

  • Before (single player, scratch world, horizon-ctl): a bobber cast at a cow hooked it, but passed through an armor stand and a boat at the same spot.
  • After: the bobber hooks the stand and reeling pulled it ~1.3 blocks toward the player.
  • New harness tools/test_fishing_hook_entities_parity.py (vanilla vs Horizon dedicated server, a vanilla client): hooked entity and end position match for a stand, a marker stand (not hooked) and a boat (position to 0.01; boat ground friction differs slightly and is not part of this fix). Without the fix it fails (no boat hook, no pull). LocatorBarClient.java gets a hooks on|off mode that records the hooked entity type.
  • Not done: the full --changed parity run (hours on a shared machine); left to CI. Hooking from inside a boat is not in the harness.

Not changed

checkCollision sweeps along the motion with inflated boxes; Horizon only tests overlap at the current position (applies to mobs too).

Check Result
Scope ✅ 3 files, +142 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 609 passed (2 min 15 s)
rustfmt ✅ (18 s)
clippy ✅ (54 s)
tests: horizon-client ✅ 614 passed (2 min 29 s)
doc tests ✅ 0 passed (4 s)
content root tests ➖ content root untouched
mod API up to date ❌ failed (23 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 124 affected, to run in CI (--quick): arrow, fishing_hook_entities, lan_integration, place_recipe, player_sync, random_tick_sections, recipe_book, recipe_book_render, recipe_book_view, recipe, redstone, registered_entity_fluid and 112 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

mod API up to date fails in xtask (mod_api::tests::new_hook_placeholder_is_reported_then_filled); this PR does not touch the mod API or native hooks, so I believe it is pre-existing on main; not verified separately.


🔄 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/6888 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/6573-fishing-hook-entities` --- ### 📝 Commits (2) - [`de5621a`](https://github.com/horizon-rust/horizon/commit/de5621ad5bb0d83b04a86ace6a0151acd4dbccc9) Fishing bobbers hook armor stands and boats - [`a8618bd`](https://github.com/horizon-rust/horizon/commit/a8618bd7ed180e7e9daf8e07eef25ef5c2366f93) Merge main into #6888 ### 📊 Changes **3 files changed** (+142 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/fishing.rs` (+47 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java` (+16 -0) ➕ `tools/test_fishing_hook_entities_parity.py` (+79 -0) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent (Claude Code), not by DUzzL himself. Fixes #6573 ## What A fishing bobber now hooks armor stands and boats, and reeling in pulls them toward the player, as in vanilla. ## Why `tick_fishing` only looked at mobs, players and dropped items. Armor stands and boats live in their own lists, so the bobber flew through them. ## Vanilla followed - `Projectile.canHitEntity`, `Entity.canBeHitByProjectile` (`isAlive() && isPickable()`), `ArmorStand.isPickable` (false for a marker), `AbstractBoat.isPickable` - `FishingHook.onHitEntity` (hook rides the entity at 0.8 of its height), `FishingHook.pullEntity` (0.1 of the way to the owner) - Approximation: the boat the owner rides is never hooked. Vanilla allows it only once `leftOwner` is set, which a bobber near the boat does not reach. ## Evidence - Before (single player, scratch world, horizon-ctl): a bobber cast at a cow hooked it, but passed through an armor stand and a boat at the same spot. - After: the bobber hooks the stand and reeling pulled it ~1.3 blocks toward the player. - New harness `tools/test_fishing_hook_entities_parity.py` (vanilla vs Horizon dedicated server, a vanilla client): hooked entity and end position match for a stand, a marker stand (not hooked) and a boat (position to 0.01; boat ground friction differs slightly and is not part of this fix). Without the fix it fails (no boat hook, no pull). `LocatorBarClient.java` gets a `hooks on|off` mode that records the hooked entity type. - Not done: the full `--changed` parity run (hours on a shared machine); left to CI. Hooking from inside a boat is not in the harness. ## Not changed `checkCollision` sweeps along the motion with inflated boxes; Horizon only tests overlap at the current position (applies to mobs too). | Check | Result | | --- | --- | | Scope | ✅ 3 files, +142 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 609 passed (2 min 15 s) | | rustfmt | ✅ (18 s) | | clippy | ✅ (54 s) | | tests: horizon-client | ✅ 614 passed (2 min 29 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ➖ content root untouched | | mod API up to date | ❌ failed (23 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 124 affected, to run in CI (--quick): arrow, fishing_hook_entities, lan_integration, place_recipe, player_sync, random_tick_sections, recipe_book, recipe_book_render, recipe_book_view, recipe, redstone, registered_entity_fluid and 112 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `mod API up to date` fails in `xtask` (`mod_api::tests::new_hook_placeholder_is_reported_then_filled`); this PR does not touch the mod API or native hooks, so I believe it is pre-existing on main; not verified separately. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:35:14 +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#7172
No description provided.