Mojira Archive
MC-248707

Hostile mobs targeting an entity they cannot pathfind to or have just attacked will repeatedly look at the entity, then away

Closely relates to MC-87093, however a "tracking" animation is not necessarily present; zombies do not show the arm animation problem from that ticket yet still exhibit this other behaviour. I cannot find any other tickets that describe this behaviour after searching.

The bug

When a hostile mob has line of sight to an entity they are targeting but is physically incapable of reaching them, they will repeatedly turn to face the entity and then back to the direction they were originally facing.

How to reproduce

A setup is shown in the attached screenshots featuring the player standing on a block as to be one block higher than the mob, which is trapped in a hole that allows them to see but not escape. Standing on the block should highlight the behaviour.

Expected results

The mob should either act normally as if no player is present, or continuously stare at the player they're interested in.

Actual results

The mobs appear to switch between acting normally and attempting to reach the player, causing them to nod strangely.

Unresolved

Connor Steppie

2022-02-19, 09:29 PM

2024-08-15, 11:08 PM

13

5

Confirmed

Low

Platform

Mob behaviour

pathfinding

1.18.2 Pre-release 1 - 24w33a1.18.2 Pre-release 1, 1.18.2, 22w15a, 22w16b, 1.19 Pre-release 3, 1.19, 1.19.1 Pre-release 4, 1.19.2, 22w42a, 1.20, 23w35a, 1.20.5 Pre-Release 1, 24w33a

-