mojira.dev
MC-267422

Attribute entity_interaction_range is classified as 'generic', but has no effect on mobs

Mobs don't seem to be affected by the attribute generic.entity_interaction_range.

How to reproduce

  1. Try summoning a zombie with the entity_interaction_range set to 0

    /summon zombie ~ ~ ~ {Attributes:[{Name:"generic.entity_interaction_range",Base:0}]}
  2. ❌ The zombie will still be able to hit you.

  3. 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

Comments 3

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.

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
 

The fix was making it player.entity_interaction_range,rather than generic. It not affecting mobs is by design, kapla.

Conure512

gegy

Confirmed

Platform

Important

Commands, Entities

23w51b

24w03a

Retrieved