So I am trying to create Mario in Minecraft and I had an idea for the pipes. I want to detect a block 4 blocks under the player and I have a block 3 blocks under the player so when you jump you go through the pipe. This command used to work perfectly until I closed out of minecraft and opened it again. I don't know whats wrong and if nobody knows then please provide an alternative. This is the command

/execute @a ~ ~ ~ detect ~ ~-4 ~ minecraft:wool 15 setblock 1179 64 -349 minecraft:redstone_block

I want it to detect black wool and then when it finds the black wool 4 blocks under the player it will create a redstone block powering a line of repeaters and command blocks that waits, teleports you down 1 block, waits again, teleports you down another, and waits a third time to teleport you down two to the secret room. The error that I am getting is

[21:28:27] Failed to execute 'detect' as Heroblind55246

Please help!

Edit: Now I get this error :

[19:26:15] Failed to execute 'setblock minecraft:redstone_block 1179 64 -349' as Heroblind55246

  • 1
    Welcome to Arqade! Nice first question! – Ben Sep 8 '15 at 6:00

It will succesfully run the command, but when you check the commandblock you aren't standing above a wool block, so it says '[21:28:27] Failed to execute 'detect' as Heroblind55246'. Try to do something like this:

/execute @a ~ ~ ~ detect ~ ~-4 ~ minecraft:wool 15 say hi

I hope it will work!

  • Thank you all for helping me, this command did work :D I will edit this comment when I try it with setblock again EDIT: So I found out the error was the setblock part. Now I get this error: [19:26:15] Failed to execute 'setblock minecraft:redstone_block 1179 64 -349' as Heroblind55246 – Aj Marcel Sep 9 '15 at 2:24
  • @AjMarcel put the coordinates first, the syntax is setblock <x> <y> <z> <block>. – MrLemon Sep 11 '15 at 9:09

I believe the issue here is with the damage value on the wool, or the position. The damage value of 15 is black wool, not green if that's what you were going for. Also, -4 means 3 blocks below the player, not 4 as block 0 is inside the player's feet. I ran this command with black wool 3 blocks below and it worked fine, while if there was no wool beneath me it gave me the same error.

  • thank you for the thing about about -4 but I get an error when checking the command block with the black wool below me, look at my original post edit to see the error – Aj Marcel Sep 9 '15 at 2:31
  • @AjMarcel you may need to have a placement mode, such as replace. So /execute @a ~ ~ ~ detect ~ ~-4 ~ minecraft:wool 15 setblock 1179 64 -349 minecraft:redstone_block 0 replace – Silentvenom7 Sep 9 '15 at 3:32
  • now I get the same error but with replace after it: [20:52:09] Failed to execute 'setblock 1179 64 -349 minecraft:redstone_block 0 replace' as Heroblind55246 – Aj Marcel Sep 9 '15 at 3:52
/execute @p ~ ~ ~ /tp @e[r=2,type=creeper] ~ ~20 ~
  • Um… not sure how this fixes OP's problem? – Nissa Dec 24 '17 at 18:14
  • 1
    Perhaps you should add some explanation to your answer, one-line answers arn't very popular here – Vahx Dec 25 '17 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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