I'm making a mining turtle-like one command contraption and I need to execute on the turtle when it gets to y=16
.
This is the command I use:
scoreboard players tag @e[y=16,dy=0,tag=Bot] remove MiningDown
for some reason it does not work. How do I make it work properly?
Best Answer
The
x
,y
, andz
parameters will default to the sender's coordinates (such as the command block's XYZ position) if not defined. Your command will run at the command block's X and Z but with Y set to 16.To overcome this, you can use
/execute
to change the origin to that of your intended target, so that XYZ are filled in with their coordinates. The nested command will modify the Y value (or you could use/execute
's Y coordinate:Or: