[GH-ISSUE #3432] Horses don't rear when hurt #974

Closed
opened 2026-11-02 15:43:16 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @degepie on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3432

🤖 Filed by degepie's AI agent (Claude Code), not by degepie personally.

What happens

In vanilla, a horse that takes damage sometimes rears up on its hind legs. In Horizon a horse never rears from damage. It only rears from its random stand goal, from makeMad (bucking, a held item) and from taming.

What vanilla does

AbstractHorse.hurtServer: after the damage is applied, if it hurt, the horse rolls random.nextInt(3). On 0 it calls standIfPossible. That rears it for 20 ticks (setStanding(20)) when canPerformRearing is true. So a hurt horse rears one time in three.

canPerformRearing is true in AbstractHorse. Only Llama (and TraderLlama) and Camel (and CamelHusk) override it to false. So horses, donkeys, mules, skeleton horses and zombie horses rear when hurt. Llamas and camels never rear, but they still make the nextInt(3) draw on every hurt, which matters for RNG parity.

Where in Horizon

At origin/main 142388e1c (from code):

  • crates/horizon-client/src/mobs/ai.rs:1768 after_hurt has no arm for equines, and there is no standIfPossible equivalent anywhere. The stand counter (m.extra.counter = 20) is only set by make_mad (mobs/equine.rs:292), the RandomStand goal (equine.rs:329) and game/mounts.rs:337.
  • So there is no rear on hurt and no nextInt(3) draw.

How to reproduce

Summon a horse and hit it a few times (/summon minecraft:horse ~ ~ ~2, then punch it in survival or creative). In vanilla it rears on about a third of the hits. In Horizon it never does. I didn't check this in game: the code above has no path for it.

Notes

  • Found by #3418: its RNG-traced zombie_horse_day_burn scenario in test_mob_ai_parity.py matches vanilla for ticks 0–9 and diverges at the first fire damage (tick 10) because this roll is missing. #3418 says this "belongs in a separate equine-parity fix".

  • Not in this issue, already in flight in open #2720:

    • AbstractHorse.isImmobile: an eating or standing horse runs no goals.
    • Donkeys and mules being able to rear (equine.rs:74 can_rear leaves them out).

    Once #2720 is in, this roll makes donkeys and mules rear on hurt too.

Originally created by @degepie on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3432 > 🤖 Filed by degepie's AI agent (Claude Code), not by degepie personally. ## What happens In vanilla, a horse that takes damage sometimes rears up on its hind legs. In Horizon a horse never rears from damage. It only rears from its random stand goal, from `makeMad` (bucking, a held item) and from taming. ## What vanilla does `AbstractHorse.hurtServer`: after the damage is applied, if it hurt, the horse rolls `random.nextInt(3)`. On 0 it calls `standIfPossible`. That rears it for 20 ticks (`setStanding(20)`) when `canPerformRearing` is true. So a hurt horse rears one time in three. `canPerformRearing` is true in `AbstractHorse`. Only `Llama` (and `TraderLlama`) and `Camel` (and `CamelHusk`) override it to false. So horses, donkeys, mules, skeleton horses and zombie horses rear when hurt. Llamas and camels never rear, but they still make the `nextInt(3)` draw on every hurt, which matters for RNG parity. ## Where in Horizon At `origin/main` 142388e1c (from code): - `crates/horizon-client/src/mobs/ai.rs:1768` `after_hurt` has no arm for equines, and there is no `standIfPossible` equivalent anywhere. The stand counter (`m.extra.counter = 20`) is only set by `make_mad` (`mobs/equine.rs:292`), the RandomStand goal (`equine.rs:329`) and `game/mounts.rs:337`. - So there is no rear on hurt and no `nextInt(3)` draw. ## How to reproduce Summon a horse and hit it a few times (`/summon minecraft:horse ~ ~ ~2`, then punch it in survival or creative). In vanilla it rears on about a third of the hits. In Horizon it never does. I didn't check this in game: the code above has no path for it. ## Notes - Found by #3418: its RNG-traced `zombie_horse_day_burn` scenario in `test_mob_ai_parity.py` matches vanilla for ticks 0–9 and diverges at the first fire damage (tick 10) because this roll is missing. #3418 says this "belongs in a separate equine-parity fix". - Not in this issue, already in flight in open #2720: - `AbstractHorse.isImmobile`: an eating or standing horse runs no goals. - Donkeys and mules being able to rear (`equine.rs:74` `can_rear` leaves them out). Once #2720 is in, this roll makes donkeys and mules rear on hurt too.
Author
Owner

@kacpherek commented on GitHub (Oct 29, 2026):

Cause, from the port ledger's verdict map (#3139, tracked in #3512): AbstractHorse.hurtServer has no port. In vanilla one hit in three makes a horse stand up for a second; Horizon never runs that roll.

<!-- gh-comment-id:6488866906 --> @kacpherek commented on GitHub (Oct 29, 2026): Cause, from the port ledger's verdict map (#3139, tracked in #3512): `AbstractHorse.hurtServer` has no port. In vanilla one hit in three makes a horse stand up for a second; Horizon never runs that roll.
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#974
No description provided.