From 6cb5e4954e3718ba55d1347c47157f7faa0f4127 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 06:21:51 +0100 Subject: [PATCH] An occupied horse gives no inventory or feeding either AbstractHorse.mobInteract (and Horse/ZombieHorse/AbstractChestedHorse) hand an isVehicle horse to Mob.mobInteract before the inventory, the feeding and the ride, so the passenger check goes before all three. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/mounts.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/horizon-client/src/game/mounts.rs b/crates/horizon-client/src/game/mounts.rs index 7da98135f..fa0052bc5 100644 --- a/crates/horizon-client/src/game/mounts.rs +++ b/crates/horizon-client/src/game/mounts.rs @@ -126,6 +126,19 @@ impl Game<'_> { if !equine::is_equine(species) || !m.alive() || Some(m.id) == self.riding { return false; } + // AbstractHorse.mobInteract: a horse a mob rides (`isVehicle`) has no + // seat, inventory or feeding to give. Camels seat two and check their + // passengers themselves. + let id = m.id; + if !matches!(species, Species::Camel | Species::CamelHusk) + && self + .mobs + .iter() + .any(|p| p.extra.mount == Some(id) && !p.removed && p.alive()) + { + return false; + } + let m = &self.mobs[index]; // AbstractHorse.mobInteract: shift + use opens a tamed adult's inventory. if !m.is_baby() && m.extra.tame @@ -175,17 +188,6 @@ impl Game<'_> { return true; } // doPlayerRide - // Entity.canAddPassenger: ordinary horses have one seat. Camels - // override that capacity; equipment and feeding above are separate. - if !matches!(species, Species::Camel | Species::CamelHusk) - && self.mobs.iter().any(|passenger| { - passenger.extra.mount == Some(self.mobs[index].id) - && !passenger.removed - && passenger.alive() - }) - { - return false; - } let m = &mut self.mobs[index]; m.extra.flag = false; m.extra.counter = 0;