diff options
| author | Marlian <84173858+MCbabel@users.noreply.github.com> | 2026-03-10 04:06:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 22:06:38 -0500 |
| commit | 91ae76f132678b010dabd30dbd87abf2087dd929 (patch) | |
| tree | eb6bfc060ae36fc13be60af17df8bac57446010c /Minecraft.World/EntityHorse.cpp | |
| parent | c90a6bf5ab4d1d96ac510f7357c9618c2bf4bc77 (diff) | |
Fix tamed horses despawning when player moves away (#1057)
Co-authored-by: MCbabel <MCbabel@users.noreply.github.com>
Diffstat (limited to 'Minecraft.World/EntityHorse.cpp')
| -rw-r--r-- | Minecraft.World/EntityHorse.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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> EntityHorse::getClosestMommy(shared_ptr<Entity> baby, double searchRadius) { |
