When a mob decides to take a Path, it will try to go to each node in order, and will get stuck for a while trying to follow that path even if sent marginally off-course, for instance by falling into a pit, regardless of the depth of such pit. Even 100 blocks away from the path, it will still attempt to pathfind to the next node, even if it is completely unreachable until it exceeds the time limit in MultiTickTask class, and only then will it attempt to pathfind again.
This not only causes the mobs to behave in a very unnatural manner after falling from their path (erratically jumping on the spot, trying to get back up - see attached video), but also cause issues in mob farms relying on a lava blade to kill the mobs since they will now try to “float up” trying to get back to an inaccessible path and their drops will burn in the lava (see 2nd video).
I believe that mobs should stop following a path if the next node gets too far from them, since the path is most likely outdated and won’t be able to be followed properly.
Furthermore, the pathfinding logic to avoid obstacles and cliffs is at the Path Node level, and in-between node travel is a simple “move forward” governed by MoveControl.tick without any checks for “dont run in lava” or “dont fall off a cliff”, which means until the path times out (which can be up to 250 ticks !) the mob will essentially blindly walk towards the node, without any obstacle avoidance, which definitely feels like incorrect logic.
Thank you for helping us improve Minecraft! We saved your files: