[PR #4199] [MERGED] Camel, horse and llama riding physics as vanilla #5477

Closed
opened 2026-11-03 05:12:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4199
Author: @kacpherek
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/camel-horse-llama-riding


📝 Commits (10+)

  • 3379afe Pass a mount's fall damage on to its riders
  • b2ba133 Hurt a llama and its riders only for falls of six blocks
  • d59d8e7 Shrink a sitting camel's hitbox to its sitting size
  • fa27fb4 Seat camel riders by the camel's sit and stand animation
  • dff7cc1 Slide a rider back and up while its horse rears
  • f4b7a89 Let a horse slide on the rider's keys after a jump while it rears
  • 381e2e9 Stand a sitting camel up when its lead pulls taut
  • 3f690a8 Walk a camel's legs only while it stands and does not dash
  • 2061f79 Share stand_if_possible between the rear goal and the rider's jump
  • bf016d1 Merge hr/main into fix/camel-horse-llama-riding; run onPlayerJump on the controlling client too (#4224)

📊 Changes

11 files changed (+346 additions, -43 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+5 -0)
📝 crates/horizon-client/src/game/mounts.rs (+75 -17)
📝 crates/horizon-client/src/game/remote.rs (+7 -2)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+5 -0)
📝 crates/horizon-client/src/landing.rs (+6 -0)
📝 crates/horizon-client/src/mobs.rs (+11 -0)
📝 crates/horizon-client/src/mobs/camel.rs (+131 -1)
📝 crates/horizon-client/src/mobs/equine.rs (+36 -5)
📝 crates/horizon-client/src/mobs/leash.rs (+1 -0)
📝 crates/horizon-client/src/mobs/living.rs (+62 -14)
📝 crates/horizon-client/src/mobs/riders.rs (+7 -4)

📄 Description

What and why

  • Pass a mount's fall damage on to its riders: A rider took no damage when the mob under it landed hard, and a mob on a mount's back never felt it either. Entity.propagateFallToPassengers hands the fall to every passenger (LivingEntity.causeFallDamage first, AbstractHorse.causeFallDamage after its own hurt and only when hurt), and each passenger runs its own causeFallDamage with its own safe distance. A mount now raises a fall event the game turns into Player.causeFallDamage for the local player and server players, and the mob causeFallDamage for a mob rider.
  • Hurt a llama and its riders only for falls of six blocks: A llama landed with the generic fall sound and hurt on any damaging fall. Llama.causeFallDamage makes no fall sound, and hurts the llama and hands the fall to its riders only when the fall is six blocks or more.
  • Shrink a sitting camel's hitbox to its sitting size: A camel that sat down kept its standing box, so it blocked and was hit as if it still stood. Camel.getDefaultDimensions gives Pose.SITTING an adult box 1.43 lower with eyes at 0.845, and a baby box 0.425 tall with eyes at 0.41. Mob::awake_dims now follows the camel's synced pose, on the server and on a client.
  • Seat camel riders by the camel's sit and stand animation: The rider's seat on a camel was a fixed height for sitting and standing, built from the old full-height box, and a mob rider sat at the top of the box when the camel sat. Camel.getPassengerAttachmentPoint takes the body anchor from the current pose box and lerps it through the sit and stand transitions (getBodyAnchorAnimationYOffset), at the camel's age scale. The player and a mob rider both use it now.
  • Slide a rider back and up while its horse rears: A horse, donkey, mule or undead horse that reared kept its rider at the fixed seat. AbstractHorse.getPassengerAttachmentPoint adds (0, 0.15, -0.7) times the previous tick's stand animation (standAnimO) to the seat, turned with the horse. The player and a mob rider both slide.
  • Let a horse slide on the rider's keys after a jump while it rears: A horse that landed from a small hop while still rearing ignored the keys until the rear ended, and a donkey or mule never reared on a jump. AbstractHorse.onPlayerJump sets allowStandSliding and calls standIfPossible (every horse that can rear), getRiddenInput only zeroes the input while the horse is standing on the ground without a jump pending and without allowStandSliding, and tick clears it once the horse stands no more.
  • Stand a sitting camel up when its lead pulls taut: A leashed sitting camel stayed down however hard the lead pulled. Camel.onElasticLeashPull stands it up when it is sitting, not changing pose, and the standing box fits where it is (canCamelChangePose, wouldNotSuffocateAtTargetPose). AbstractHorse.onElasticLeashPull, which it calls first, also ends a horse's grazing.
  • Walk a camel's legs only while it stands and does not dash: A camel's legs used the default walk: they kept swinging while it sat or dashed and eased in at 0.4. Camel.updateWalkAnimation aims at 6 times the distance moved (at most 1) only in the standing pose with no dash animation running, otherwise at zero, and eases at 0.2. The remote client's own walk update uses it for camels too.

Vanilla reference

Each commit message names the vanilla method and file it follows.

Self-check

Split out of #3947 (boats in bubble columns), which review suggested should not carry the camel, horse and llama physics; rebased onto current main (the llama and horse fall sound now follows main's horse thud). rustfmt on changed files; built by CI; 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/4199 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/camel-horse-llama-riding` --- ### 📝 Commits (10+) - [`3379afe`](https://github.com/horizon-rust/horizon/commit/3379afe80768118d5ea468efc8d1fc038ed4cce9) Pass a mount's fall damage on to its riders - [`b2ba133`](https://github.com/horizon-rust/horizon/commit/b2ba13377beaf8acd180e93cb2e50252e8728d16) Hurt a llama and its riders only for falls of six blocks - [`d59d8e7`](https://github.com/horizon-rust/horizon/commit/d59d8e714719ce04b3f834391704b108993ca6f6) Shrink a sitting camel's hitbox to its sitting size - [`fa27fb4`](https://github.com/horizon-rust/horizon/commit/fa27fb40882cd51b9dfbb7d13a5d909d61f26beb) Seat camel riders by the camel's sit and stand animation - [`dff7cc1`](https://github.com/horizon-rust/horizon/commit/dff7cc1dda83fd796c4e97c296ee919f18d3c2ff) Slide a rider back and up while its horse rears - [`f4b7a89`](https://github.com/horizon-rust/horizon/commit/f4b7a899b8b2a4399d252390492fe7ec35284b9e) Let a horse slide on the rider's keys after a jump while it rears - [`381e2e9`](https://github.com/horizon-rust/horizon/commit/381e2e9a84dd800df3c6e7e7fa3e02461a464d0a) Stand a sitting camel up when its lead pulls taut - [`3f690a8`](https://github.com/horizon-rust/horizon/commit/3f690a811cfd89c6fc72bf04944de254a0d59166) Walk a camel's legs only while it stands and does not dash - [`2061f79`](https://github.com/horizon-rust/horizon/commit/2061f797ba2d085a2fa74f9b1046ca59e653665b) Share stand_if_possible between the rear goal and the rider's jump - [`bf016d1`](https://github.com/horizon-rust/horizon/commit/bf016d1c5492c7b663115c1a890970f5a145cd4b) Merge hr/main into fix/camel-horse-llama-riding; run onPlayerJump on the controlling client too (#4224) ### 📊 Changes **11 files changed** (+346 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+5 -0) 📝 `crates/horizon-client/src/game/mounts.rs` (+75 -17) 📝 `crates/horizon-client/src/game/remote.rs` (+7 -2) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+5 -0) 📝 `crates/horizon-client/src/landing.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs.rs` (+11 -0) 📝 `crates/horizon-client/src/mobs/camel.rs` (+131 -1) 📝 `crates/horizon-client/src/mobs/equine.rs` (+36 -5) 📝 `crates/horizon-client/src/mobs/leash.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/living.rs` (+62 -14) 📝 `crates/horizon-client/src/mobs/riders.rs` (+7 -4) </details> ### 📄 Description ## What and why - Pass a mount's fall damage on to its riders: A rider took no damage when the mob under it landed hard, and a mob on a mount's back never felt it either. Entity.propagateFallToPassengers hands the fall to every passenger (LivingEntity.causeFallDamage first, AbstractHorse.causeFallDamage after its own hurt and only when hurt), and each passenger runs its own causeFallDamage with its own safe distance. A mount now raises a fall event the game turns into Player.causeFallDamage for the local player and server players, and the mob causeFallDamage for a mob rider. - Hurt a llama and its riders only for falls of six blocks: A llama landed with the generic fall sound and hurt on any damaging fall. Llama.causeFallDamage makes no fall sound, and hurts the llama and hands the fall to its riders only when the fall is six blocks or more. - Shrink a sitting camel's hitbox to its sitting size: A camel that sat down kept its standing box, so it blocked and was hit as if it still stood. Camel.getDefaultDimensions gives Pose.SITTING an adult box 1.43 lower with eyes at 0.845, and a baby box 0.425 tall with eyes at 0.41. Mob::awake_dims now follows the camel's synced pose, on the server and on a client. - Seat camel riders by the camel's sit and stand animation: The rider's seat on a camel was a fixed height for sitting and standing, built from the old full-height box, and a mob rider sat at the top of the box when the camel sat. Camel.getPassengerAttachmentPoint takes the body anchor from the current pose box and lerps it through the sit and stand transitions (getBodyAnchorAnimationYOffset), at the camel's age scale. The player and a mob rider both use it now. - Slide a rider back and up while its horse rears: A horse, donkey, mule or undead horse that reared kept its rider at the fixed seat. AbstractHorse.getPassengerAttachmentPoint adds (0, 0.15, -0.7) times the previous tick's stand animation (standAnimO) to the seat, turned with the horse. The player and a mob rider both slide. - Let a horse slide on the rider's keys after a jump while it rears: A horse that landed from a small hop while still rearing ignored the keys until the rear ended, and a donkey or mule never reared on a jump. AbstractHorse.onPlayerJump sets allowStandSliding and calls standIfPossible (every horse that can rear), getRiddenInput only zeroes the input while the horse is standing on the ground without a jump pending and without allowStandSliding, and tick clears it once the horse stands no more. - Stand a sitting camel up when its lead pulls taut: A leashed sitting camel stayed down however hard the lead pulled. Camel.onElasticLeashPull stands it up when it is sitting, not changing pose, and the standing box fits where it is (canCamelChangePose, wouldNotSuffocateAtTargetPose). AbstractHorse.onElasticLeashPull, which it calls first, also ends a horse's grazing. - Walk a camel's legs only while it stands and does not dash: A camel's legs used the default walk: they kept swinging while it sat or dashed and eased in at 0.4. Camel.updateWalkAnimation aims at 6 times the distance moved (at most 1) only in the standing pose with no dash animation running, otherwise at zero, and eases at 0.2. The remote client's own walk update uses it for camels too. ## Vanilla reference Each commit message names the vanilla method and file it follows. ## Self-check Split out of #3947 (boats in bubble columns), which review suggested should not carry the camel, horse and llama physics; rebased onto current main (the llama and horse fall sound now follows main's horse thud). rustfmt on changed files; built by CI; 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 05:12:51 +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#5477
No description provided.