mojira.dev
MC-151431

y and dy don't work with non-player entities

How to reproduce:

-Make sure to have multiple entities in range

-Execute this command:

/execute as @e[y=0,dy=255] run say @s

What I expected:

Every entity in range which is in the building limit sound say it's name in chat

What did happen:

Only the Player said it's name in chat

Comments 4

Should be written as

/execute as @e at @s run say @s[y=0,dy=255]

But i need it in the execute command for running a function, like so:

/execute as @s at @s if entity @s[y=0,dy=255] run function ...

That works too 🙂 (except for the redundant as @s)

If i try this command in game:

/execute as @e at @s if entity @s[y=0,dy=255] run say hi

i works, but i have this command in a function, and it doesn't work:

execute as @s at @s if entity @s[tag=!rth.graves.found_space] if entity @s[y=0,dy=255] run function piston_randomthings:misc/graves/find_free_spot

The command works fine when I use it ingame(also on non-player entities now) nut in the function it just fails.

JoeJoeTV

(Unassigned)

Unconfirmed

(Unassigned)

Minecraft 1.14.1 Pre-Release 2

Retrieved