Mobs don't seem to be affected by the attribute generic.entity_interaction_range.
How to reproduce
Try summoning a zombie with the
entity_interaction_range
set to 0/summon zombie ~ ~ ~ {Attributes:[{Name:"generic.entity_interaction_range",Base:0}]}
❌ The zombie will still be able to hit you.
Conversely, if you set this value to something really high like 100, the zombie will still need to get up close before it attacks.
Linked issues
relates to 2
Comments 3
This issue still occurs.
After using command from repro steps zombie attributes did not change. Additionally command have been tested on other mobs as well and it did not change their attributes.
Could you please provide more information about the issue or use of mentioned command.
Retested on:
Platform: Win 11
Java snapshot version: 24w03a
Attributes not applying to some entities is a feature request, not a bug. Additionally the changelog explicitly said players.
EDIT: and here goes mojang being inconsistent again; this comment was based on the resolution/comment on MC-180199.