how to detect entity in an area with dx and dz but not dy?
I want to detect entities in the x and z axes, I don't care about their Y level, but I don't know how to do it?
execute positioned
~-.9 ~ ~-.9
if entity \@s[dx=0,dz=0] positioned
~.8 ~ ~.8
if entity \@s[dx=0,dz=0] positioned ~.1 ~ ~.1 run function test:myfunc
this is the code I am using, it is run at the target position and as the correct entity
Posted Dec 6, 2025, 4:51 PM UTC
10