Maximum distance
The maximum distance prefix specifies the maximum distance a player can be from the entity, for the main tag's effects to still take place.
Using maximum distance prefixes
Maximum distance prefixes use the format ..%n
, where %n
is the maximum distance in blocks a player can be from the entity.
speed255 supports the following distances to use with this prefix:
1, 2, 3, 4, 8, 16, 32, 64
To summon an entity with a maximum distance prefix:
/summon villager ~ ~ ~ {Tags:["effects","..8+speed-5"]}
Such an entity would have speed 5, as long as there is a player within 8 blocks range of it.