[PR #7758] A ridden horse jumps normally against other mobs #7804

Open
opened 2026-11-03 07:24:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7758
Author: @razzo715
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/ridden-mount-not-pushed


📝 Commits (1)

  • 9204f99 A ridden mount is not pushed by the mobs it touches (#7647)

📊 Changes

2 files changed (+76 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/mobs.rs (+2 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+74 -6)

📄 Description

🤖 Opened by razzo715's AI agent (Claude Code, Claude Opus 5.5), not by razzo715 personally.

What and why

On a Horizon server (single player included), a ridden horse that touched another mob jumped lower, or not at all (#7647). Java servers were fine.

Entity.push(Entity) moves an entity only when it is not a vehicle (!isVehicle() && isPushable(), checked for both entities). Horizon's push_entities pushed a ridden horse anyway: the cow's push reached it as a Push event, and its own push moved it. The server then sent the horse's new motion to its rider (SetEntityMotion), and the rider's client, which drives the horse, took it over the jump's upward motion.

Now a mob that is a vehicle (a player or a mob on its back) is neither pushed by the mobs it touches nor moved by its own push; the mobs around it are still pushed away, as in vanilla. Seen gains is_vehicle (equine::is_vehicle: a rider steering it or a mob on it) so a pusher knows its target is one.

Fixes #7647

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Entity.push(Entity): isPassengerOfSameVehicle, noPhysics, then if (!this.isVehicle() && this.isPushable()) this.push(-d, 0, -e) and if (!entity.isVehicle() && entity.isPushable()) entity.push(d, 0, e) (read from the 26.3 client jar with javap -c). LivingEntity.pushEntities still selects a ridden horse (EntitySelector.pushableBy tests isPushable, not isVehicle), so the cow on the other side is pushed.

New unit test: mobs::ai::same_vehicle_push_tests::a_ridden_horse_is_not_pushed_but_still_pushes (a ridden horse pushes a cow and isn't pushed back; a cow pushing it moves away and doesn't push it; a horse nobody rides is still pushed).

In game (Windows, single player on its server thread), riding a saddled horse into a wall with horizon-ctl, holding jump for 10 ticks:

Rise before (main 2050c4e0f) Rise after (this branch, on b451b111e)
Wall only 3.124 3.124
A cow pressed against the wall 1.851 3.124
Two cows 2.594 3.124

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-Q5U547F, against upstream/main at b451b111e, 9 min 32 s)

Check Result
Scope ✅ 3 files, +77 −6
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (1 min 52 s)
rustfmt ✅ (17 s)
Rust ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (24 s)
tests: horizon-client-lib ✅ 1467 passed (6 min 48 s)
doc tests ✅ 0 passed (3 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 345 affected, to run in CI (--quick): arrow, block_pile, block_properties, block_support, block_survival, block_tint, block_transformer, block_update, blocking_item_damage, blocking_rules, blockstate_binding, blockstate_model and 333 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The scope counts an untracked file the game wrote in the checkout (horizon_official_server.txt); the change itself is 2 files. The parity harnesses are left to CI: a full local run ran out of disk on this machine.

🤖 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/7758 **Author:** [@razzo715](https://github.com/razzo715) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/ridden-mount-not-pushed` --- ### 📝 Commits (1) - [`9204f99`](https://github.com/horizon-rust/horizon/commit/9204f99e258dc35baf4a21ad5c46ef35796bd8ba) A ridden mount is not pushed by the mobs it touches (#7647) ### 📊 Changes **2 files changed** (+76 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+74 -6) </details> ### 📄 Description > 🤖 Opened by razzo715's AI agent (Claude Code, Claude Opus 5.5), not by razzo715 personally. ## What and why On a Horizon server (single player included), a ridden horse that touched another mob jumped lower, or not at all (#7647). Java servers were fine. `Entity.push(Entity)` moves an entity only when it is not a vehicle (`!isVehicle() && isPushable()`, checked for both entities). Horizon's `push_entities` pushed a ridden horse anyway: the cow's push reached it as a `Push` event, and its own push moved it. The server then sent the horse's new motion to its rider (`SetEntityMotion`), and the rider's client, which drives the horse, took it over the jump's upward motion. Now a mob that is a vehicle (a player or a mob on its back) is neither pushed by the mobs it touches nor moved by its own push; the mobs around it are still pushed away, as in vanilla. `Seen` gains `is_vehicle` (`equine::is_vehicle`: a rider steering it or a mob on it) so a pusher knows its target is one. Fixes #7647 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `Entity.push(Entity)`: `isPassengerOfSameVehicle`, `noPhysics`, then `if (!this.isVehicle() && this.isPushable()) this.push(-d, 0, -e)` and `if (!entity.isVehicle() && entity.isPushable()) entity.push(d, 0, e)` (read from the 26.3 client jar with `javap -c`). `LivingEntity.pushEntities` still selects a ridden horse (`EntitySelector.pushableBy` tests `isPushable`, not `isVehicle`), so the cow on the other side is pushed. New unit test: `mobs::ai::same_vehicle_push_tests::a_ridden_horse_is_not_pushed_but_still_pushes` (a ridden horse pushes a cow and isn't pushed back; a cow pushing it moves away and doesn't push it; a horse nobody rides is still pushed). In game (Windows, single player on its server thread), riding a saddled horse into a wall with `horizon-ctl`, holding jump for 10 ticks: | | Rise before (main 2050c4e0f) | Rise after (this branch, on b451b111e) | | --- | --- | --- | | Wall only | 3.124 | 3.124 | | A cow pressed against the wall | 1.851 | 3.124 | | Two cows | 2.594 | 3.124 | ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-Q5U547F, against upstream/main at b451b111e, 9 min 32 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +77 −6 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (1 min 52 s) | | rustfmt | ✅ (17 s) | | Rust | ⚠️ 1.98.1 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (24 s) | | tests: horizon-client-lib | ✅ 1467 passed (6 min 48 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 345 affected, to run in CI (--quick): arrow, block_pile, block_properties, block_support, block_survival, block_tint, block_transformer, block_update, blocking_item_damage, blocking_rules, blockstate_binding, blockstate_model and 333 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The scope counts an untracked file the game wrote in the checkout (`horizon_official_server.txt`); the change itself is 2 files. The parity harnesses are left to CI: a full local run ran out of disk on this machine. 🤖 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>
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#7804
No description provided.