The Bug:
Entities do not attack the nearest targets.
Steps to Reproduce:
Build the setup as shown in the attachment below.
Stand on top of the cobblestone slab and summon a villager with NoAI at your location by using the command provided below.
/summon minecraft:villager ~ ~ ~ {NoAI:1b}
Spawn a husk on top of each of the four diamond blocks and observe how they all become aggressive towards the villager.
Summon a villager on top of each of the four diamond blocks.
Wait around twenty seconds and watch the behavior of the husks closely.
Take note as to whether or not entities attack the nearest targets.
Observed Behavior:
Entities do not attack the nearest targets.
Expected Behavior:
Entities would attack the nearest targets.
Linked issues
is duplicated by 11
Attachments
Comments 23


Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.
Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.
No response for over a year.

Can't confirm this specific issue, but can confirm MC-2494 which was resolved as a duplicate of this - not convinced they're the same issue though.
Might be intended because that's how mobs have always behaved, also in 1.9 zombies target players over villagers if the player is in the zombies sight.
Can confirm in 21w06a.
Can confirm in 21w07a. Video attached.
Can confirm in 21w11a.

Can confirm in 1.17.1.
Can confirm in 1.18.1 and 1.18.2 Pre-release 1.
Kinda related to MC-590, in that a fix for one may inadvertently fix the other, depending on how it's done.