mojira.dev
MC-130152

"distance" selector does not seem to work with any non-zero number

I came across this issue when trying to create a zombie HP bossbar that would detect the nearest zombie and store its hp in the bar. However, I noticed that the command selector I used (the command for storing max HP, for example, was "/execute as @p run execute store result bossbar minecraft:zombie max run data get entity @e[type=zombie,distance=10,limit=1] Attributes[0].Base"). The distance selector does not work. The command block gives no output, so there wasn't an error in the command. I confirmed this using /say as well. Doing /say hi @e[limit=1,distance=10] resulted in it just saying hi. However, using /say hi @e[limit=1,distance=0] said hi YourAverageLink, so it seems to work with a distance of 0, but not with any other number.

Linked issues

Comments 0

No comments.

Alex DiGiovanni

(Unassigned)

Unconfirmed

Minecraft 18w21a

Retrieved