-1

I don't know why this command failed to find the creeper.

# Summoned via
/summon minecraft:creeper 208.46 79.00 -74.56 {Fuse: 9999,Health: 1,ignited: 1}
# Testing selector
/execute if entity @e[type=minecraft:creeper,nbt={ignited:1}] run tellraw "true"
# Also tried
/execute if entity @e[type=minecraft:creeper,nbt={ignited: 1}] run tellraw "true"
/execute if entity @e[type=minecraft:creeper,nbt={ignited:1b}] run tellraw "true"
/execute if entity @e[type=minecraft:creeper,nbt={ignited: 1b}] run tellraw "true"
  • Exact matching, 1b – Fabian Röling Jun 20 at 16:38
  • @FabianRöling I have tried that, and not succeeded. (added all I came up with...) – Akxe Jun 20 at 17:07
4

The syntax for /tellraw is

/tellraw <targets> <message>

You didn´t specify a target, so the command fails to execute. You can just add @a and it will work.

/execute if entity @e[type=minecraft:creeper,nbt={ignited:1b}] run tellraw @a "true"
  • I feel dumb, as the command does not complain about not having a message, I thought @a was optional – Akxe Jun 20 at 19:19
  • 1
    I do stupid mistakes, too, you have maybe seen one of those "I'm stuck in a kill loop" questions? I've been there, too (but I didn't ask, I just deleted the world, it was new anyway). For the record: kill @e is not a good command for a repeating command block that is always active – bearb001 Jun 20 at 19:20
  • Amazing command! :D Had blast reading it :D And With this little help, I did the creeper proxymity based mobGriefing rule activator! – Akxe Jun 20 at 19:27

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.