I notice this bug initially from a realm I was playing in. I thought it was intentional but it got really annoying because the Wandering Trader's Llamas always kept getting in the way. I then went over to my barn and noticed how all of my horses had this exact same behaviour when strapped to a fence. I then went over to a separate world and tried to replicate the issue and to my surprise, it happens to any mob that can be leashed as soon as they begin to walk out of bounds from the lead. Then it would walk to the player/entity/post but then would begin to walk again in the same direction, causing an infinite loop.
What I expected to happen was:
The mob would return to the player/entity/post and then pause for any further movement from the player/entity to continue to follow. Then it would try to walk within the lead's boundaries.
What actually happened was:
The mob would return to the player/entity/post as intended, but would then continue on its original path despite the fact the mob can't reach its destination.
Steps to Reproduce:
- First get an entity that can be equipped with a lead (preferably a llama for the sake of the demo).
- Then either wait for the mob to move out of bounds, (when the lead begins to stretch) or attach it to a fence.
- Observe it's behaviour when it walks. (Give it time, it can take a while)