4

So I'm pretty new to testfor still and I would like to know how to create a commandblock system that would detect when they are standing on a yellow wool block on the coordinates 400 4 600 (for example) does anyone know how to setup this redstone suystem, and also be specific about how I set the redstone system up, so for example show me a picture on how the setup of it would look like.

2 Answers 2

5

You'll need a redstone clock with a command block as shown below: How to set up

In the command block add the command /testfor @a[x=400,y=4,z=Z,r=600] and start up your clock. When ever a user is at that location, the red output line as shown in the picture will power. Once they have left the position, the output will power off.

4
  • This will test for players at that location, but not whether or not they are standing on yellow wool.
    – SirBenet
    Commented Mar 25, 2015 at 18:57
  • But if the yellow wool is at that location, surely it'll be fine. OP hasn't mentioned the wool moving?
    – ConnorMcF
    Commented Mar 25, 2015 at 19:32
  • Depends; OP's question isn't really clear about it. It could be that the yellow wool just happens to be at those coords and it isn't necessary to detect it, but I understood it as only wanting to detect people who are standing on yellow wool, which may or may not be at those coords.
    – SirBenet
    Commented Mar 25, 2015 at 21:26
  • I only wanted to know if I could use testfor to see if a certain person is standing on a not moving yellow block wool, so the yellow block wool is solid, so if someone is standing on the yellow block wool, will the command then activate the redstone system and the command within the /testfor itself? Commented Mar 27, 2015 at 8:43
1

You can try a command like this:

execute @a[x=400,y=4,z=600] ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 4 [Command]

For [Command], you can do something like scoreboard players set @p dummyobjective 1

Then execute @a[score_dummyobjective_min=1] ~ ~ ~ [command]

But those last two lines are usually only needed if you want to run multiple commands, or to keep track of multiple players.

4
  • I'm not really familia with the redstone system that is used for execute, would you be able to show me a picture on how it would activate exactly, and what redstone system would be used for it? Commented Mar 27, 2015 at 9:08
  • Not currently, but if you give me a while I can. I'm not able to play at the moment. If you could supply what you want to do when a player stands on the block, I can fill in the command for you. After that, it's just a matter of having a redstone clock activate a command block with the command above inside of it. Commented Mar 27, 2015 at 14:40
  • Also, if you want the command to activate no matter where he is in the world, just remove the '[x=400,y=4,z=600]'. Commented Mar 27, 2015 at 14:41
  • Give me a picture of the redstone system I would be using for this command Commented Mar 27, 2015 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.