2

I am trying to summon a lightning bolt when a repeating command block detects an arrow on grass, but every time the command block runs it throws the error:

Failed to execute 'summon' on Arrow.

I'm on Minecraft Bedrock version 1.12.1.

Command:

/execute @e[type=arrow] ~ ~ ~ detect ~ ~-1 ~ grass 1 summon lightning_bolt
  • 2
    This needs more details, for example: What Minecraft version are you using? That /execute syntax was changed almost two years ago. And what have you tried yourself to solve the problem? – Fabian Röling Sep 21 at 14:04
  • 3
    Guys, he gave enough information to solve the problem; The syntax of commands is very different in Bedrock than it is in Java, and it has not changed with the times. He is very simply asking why his command is not summoning a lightning_bolt at an arrow inside of grass and is instead throwing an error. The only reason his command does not work is simply because he is testing for grass with a metadata of 1 instead of a metadata of -1, which means ignore metadata. I believe this question was incorrectly flagged as unclear. – Zach K Sep 24 at 20:13
  • @ZachK If you know why his command isn't working, you should make a proper answer instead of partially answer in comments. – Zoma Sep 25 at 12:59
  • I was unable to previously because the post was on hold. I will create a full answer now. – Zach K Sep 26 at 1:19
1

Currently, your command is executing at all arrows which are on a block of grass with a metadata of 1; typical grass blocks don't have a metadata of 1. In order to fix this, set the value of 1 to -1, resulting in:

/execute @e[type=arrow] ~ ~ ~ detect ~ ~-1 ~ grass -1 summon lightning_bolt

The value of -1 tells Minecraft to ignore metadata instead of check for it.

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.