The bug
Mobs are able to track players/other mobs through diagonally placed blocks.
How to reproduce / Example
I made a little encasement for zombies, as you can see in picture 1. It has diagonal blocks.
[media]In picture 2 you see a villager on the outside of the encasement and all the zombies try to get to him.
[media]In picture 3 you seen another villager inside the encasement, they don't seem to be interested though.
[media]→ ❌ They shouldn't see the villager on the outside only the one on the inside.
Affected mobs
Ocelots and chickens
Llamas and wolves
Wolves and skeletons
Wolves and rabbits
Wolves and sheep
Villagers and evokers (not vindicators however?)
Iron golems and evokers
Related issues
is duplicated by
Attachments
Comments


Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w43a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

Confirmed for 1.12.1
Also, zombie pigmen also apply

Confirmed for 18w22a
I know for a fact they are tracking something, and not just "idle" since I have villagers at a close proximity.
They all have a walkable path out of there.

Can also confirm for 1.13-PRE2
Does this still happen in 1.14.1 Pre-Release 1?

Still in 1.14.1 Release

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2

I see no signs of this bug in 1.15.2

Can confirm in 21w44a.
Can you still reproduce this in 1.20.2? I cannot seem to get the same results as you in 23w42.
[media]
Can't seem to reproduce in 1.17.1 either:
[media]
After some digging, I can confirm this issue was actually fixed in 1.14.1 Pre-Release 1. Specifically; check out MC-142817 for the issue.
Zombies can still remember entities through corners only if the corner is placed after the zombie locks on to the target. But, this also applies to blocks placed in a vertical/horizontal row.
With that being said, all the versions after 1.14.1 pre-release 1 seem to be another issue, which is that mobs can remember entities after they no longer have line of sight to them.
1.14 vs. 1.14.1 pre-release 1
[media]
Then I'd rather suggest reformatting this report, seeing as that's what kept being tested anyways, and it'd be kinda useless to resolve this as duplicate and make a new report.