From 91ae76f132678b010dabd30dbd87abf2087dd929 Mon Sep 17 00:00:00 2001 From: Marlian <84173858+MCbabel@users.noreply.github.com> Date: Tue, 10 Mar 2026 04:06:38 +0100 Subject: Fix tamed horses despawning when player moves away (#1057) Co-authored-by: MCbabel --- Minecraft.World/EntityHorse.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Minecraft.World/EntityHorse.cpp') diff --git a/Minecraft.World/EntityHorse.cpp b/Minecraft.World/EntityHorse.cpp index 32c9eb2d..0bf5bc08 100644 --- a/Minecraft.World/EntityHorse.cpp +++ b/Minecraft.World/EntityHorse.cpp @@ -515,6 +515,15 @@ bool EntityHorse::canSpawn() return Animal::canSpawn(); } +bool EntityHorse::removeWhenFarAway() +{ + if (isTamed()) return false; + if (isSaddled()) return false; + if (isLeashed()) return false; + if (getArmorType() > 0) return false; + return Animal::removeWhenFarAway(); +} + shared_ptr EntityHorse::getClosestMommy(shared_ptr baby, double searchRadius) { -- cgit v1.2.3