Minecraft execute detect command not working

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
Best Answer
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!
Pictures about "Minecraft execute detect command not working"



Is the Testfor command still in Minecraft?
You can test for a certain target in the game using the /testfor command in Minecraft. TIP: Starting in Minecraft Java Edition (PC/Mac) 1.13, the /testfor command was removed from the Java Edition version of the game.How to use the execute detect command in MCPE | Updated
More answers regarding minecraft execute detect command not working
Answer 2
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.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: cottonbro, Kampus Production, Pixabay, cottonbro