[PR #5514] [MERGED] Fence knot clicks and experience orb smoothing as in vanilla (#4505 follow-up) #6331

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5514
Author: @kacpherek
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/knot-and-orbs


📝 Commits (4)

  • 6d2682c Take leads back or snip them only when the click hits the fence knot
  • 67c4b57 Smooth an experience orb's server corrections over 3 ticks
  • 934df75 Orbs draw their correction step; a knot is hit only within entity range
  • 2c9b07d Merge main into #5514 (ExperienceOrb::tick's new argument kept)

📊 Changes

2 files changed (+63 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/leads.rs (+23 -4)
📝 crates/horizon-client/src/game/remote.rs (+40 -4)

📄 Description

What and why

Two follow-ups to #4505 from Joansitoh's review there:

  • Fence knot clicks. LeashFenceKnotEntity.interact runs only when the ray meets the knot before the post: the knot's box (recalculateBoundingBox, 0.375 wide, y + 0.375 to y + 0.875) is wider than the post, so a hit point on the post inside it went through the knot first. Any other click on the fence is FenceBlock.useWithoutItem / LeadItem.useOn, which only ties the player's own mobs (LeadItem.bindPlayerMobs). interact_knot ran the take-back and shears branches for every fence click: clicking the top of a post with stone took a tied horse's lead instead of placing the stone, and shears snipped every lead. Those branches now need a hit inside the knot box (and a knot to exist); tying the player's own mobs works on any click, as before.
  • Experience orb corrections. ExperienceOrb.createInterpolationHandler returns a LinearInterpolationHandler: a client spreads each server correction over 3 ticks (doInterpolate from Entity.commonTick), and the orb's own move carries the target along (applyPredictedMovement). The remote path snapped the orb at once, so it jumped on every correction, and the comment wrongly claimed Entity's NO_OP handler. Corrections now go through the existing lerps map and are applied before ExperienceOrb::tick. Vanilla also checks the carried target for collisions; that check is left out.

Vanilla reference

LeashFenceKnotEntity.interact / recalculateBoundingBox, FenceBlock.useWithoutItem, LeadItem.useOn / bindPlayerMobs, ExperienceOrb.createInterpolationHandler, LinearInterpolationHandler.doInterpolate, AbstractInterpolationHandler.interpolate / applyPredictedMovement, Entity.commonTick (checked against a pure vanilla 26.3 decompile).

How it was checked

cargo check -p horizon-client --tests passes, the Python suite passes (510 tests), rustfmt clean. Not run in game.


🔄 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/5514 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/knot-and-orbs` --- ### 📝 Commits (4) - [`6d2682c`](https://github.com/horizon-rust/horizon/commit/6d2682cf87acea3f6fd8132d95ebc8b379c792f0) Take leads back or snip them only when the click hits the fence knot - [`67c4b57`](https://github.com/horizon-rust/horizon/commit/67c4b573adb4200ae6a6a45a16cefc29a5d38570) Smooth an experience orb's server corrections over 3 ticks - [`934df75`](https://github.com/horizon-rust/horizon/commit/934df75a120928f69869e33f3db9443b9dbb4051) Orbs draw their correction step; a knot is hit only within entity range - [`2c9b07d`](https://github.com/horizon-rust/horizon/commit/2c9b07d6d1fdb0797bab4871ec9472434823387e) Merge main into #5514 (ExperienceOrb::tick's new argument kept) ### 📊 Changes **2 files changed** (+63 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/leads.rs` (+23 -4) 📝 `crates/horizon-client/src/game/remote.rs` (+40 -4) </details> ### 📄 Description ## What and why Two follow-ups to #4505 from Joansitoh's review there: - **Fence knot clicks.** `LeashFenceKnotEntity.interact` runs only when the ray meets the knot before the post: the knot's box (`recalculateBoundingBox`, 0.375 wide, y + 0.375 to y + 0.875) is wider than the post, so a hit point on the post inside it went through the knot first. Any other click on the fence is `FenceBlock.useWithoutItem` / `LeadItem.useOn`, which only ties the player's own mobs (`LeadItem.bindPlayerMobs`). `interact_knot` ran the take-back and shears branches for every fence click: clicking the top of a post with stone took a tied horse's lead instead of placing the stone, and shears snipped every lead. Those branches now need a hit inside the knot box (and a knot to exist); tying the player's own mobs works on any click, as before. - **Experience orb corrections.** `ExperienceOrb.createInterpolationHandler` returns a `LinearInterpolationHandler`: a client spreads each server correction over 3 ticks (`doInterpolate` from `Entity.commonTick`), and the orb's own move carries the target along (`applyPredictedMovement`). The remote path snapped the orb at once, so it jumped on every correction, and the comment wrongly claimed `Entity`'s NO_OP handler. Corrections now go through the existing `lerps` map and are applied before `ExperienceOrb::tick`. Vanilla also checks the carried target for collisions; that check is left out. ## Vanilla reference `LeashFenceKnotEntity.interact` / `recalculateBoundingBox`, `FenceBlock.useWithoutItem`, `LeadItem.useOn` / `bindPlayerMobs`, `ExperienceOrb.createInterpolationHandler`, `LinearInterpolationHandler.doInterpolate`, `AbstractInterpolationHandler.interpolate` / `applyPredictedMovement`, `Entity.commonTick` (checked against a pure vanilla 26.3 decompile). ## How it was checked `cargo check -p horizon-client --tests` passes, the Python suite passes (510 tests), rustfmt clean. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:18:19 +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#6331
No description provided.