I'm trying to to make a command block detect if a player is standing at specific coordinates and give a redstone output (with a comparator) if it is true using the /execute command .It's such a shame that they removed the /testfor command as it was much easier to do stuff like this. I've watched a bunch of tutorials on how to do this but none of them worked. Any suggestions?
First suggestion : Never talk about "testfor" and "comparators" in command blocks forum, these were already prehistoric things since 1.8 (in that version, /testfor could test more things than /execute, though /scoreboard could have the same arguments so /testfor was only for debugging and checks).
Here's an exemple :
execute as @a[x=-141,y=4,z=-6,distance=..1] run say eh
I don't know what you want so I can't really give you the command you exactly need, though this one will make any player entering a 1-block radius from -141 4 -6 run the command "/say eh".
In /execute, secondary commands must not have a slash.
Also, if you want to trigger other commands if it's true, you can use chain command blocks.
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Hey there!
I'm trying to to make a command block detect if a player is standing at specific coordinates and give a redstone output (with a comparator) if it is true using the /execute command .It's such a shame that they removed the /testfor command as it was much easier to do stuff like this. I've watched a bunch of tutorials on how to do this but none of them worked. Any suggestions?
First suggestion : Never talk about "testfor" and "comparators" in command blocks forum, these were already prehistoric things since 1.8 (in that version, /testfor could test more things than /execute, though /scoreboard could have the same arguments so /testfor was only for debugging and checks).
Here's an exemple :
I don't know what you want so I can't really give you the command you exactly need, though this one will make any player entering a 1-block radius from -141 4 -6 run the command "/say eh".
In /execute, secondary commands must not have a slash.
Also, if you want to trigger other commands if it's true, you can use chain command blocks.
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Thanks! That seemed to do the trick!