Minecraft execute detect error [closed]

Minecraft execute detect error [closed] - Expressive angry businessman in formal suit looking at camera and screaming with madness while hitting desk with fist

I am trying to make a troll command where if there is a diamond ore 3 blocks ahead of you (I have 4 different command blocks for each direction) it kills you. It worked fine earlier, but now is coming up with [18:04:49] Failed to execute 'detect' as KnightzYT. Here's my command:

/execute @a ~ ~ ~ detect ~3 ~ ~ minecraft:diamond_ore -1 kill @p


Best Answer

The problem is fairly simple, and is that you cannot have the '-1' for the damage value of the diamond ore. You must specify a positive integer for the command.

Since there is only one damage value a diamond ore can have, the fix is fairly simple. Just change the value!

/execute @a ~ ~ ~ detect ~3 ~ ~ minecraft:diamond_ore 0 kill @p

Thats about it! Have fun trolling :)




Pictures about "Minecraft execute detect error [closed]"

Minecraft execute detect error [closed] - Close-Up Shot of Keyboard Buttons
Minecraft execute detect error [closed] - Black Smartphone on Table
Minecraft execute detect error [closed] - 1 + 1 = 3 Text on Black Chalkboard





How to detect a player using command blocks! | /execute command tutorial for 1.16 Minecraft Java




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Andrea Piacquadio, Miguel Á. Padriñán, Polina Zimmerman, George Becker