I currently have this command: execute at @e[type=minecraft:creeper] run summon minecraft:lightning_bolt; but I have no idea where I should put the "{}" to check for the NBTs.

1 Answer 1


You can use nbt={} as a target selector arguments.

As you know, not charged creepers have {powered:0b} in their nbt tags.

So @e[type-creeper,nbt={powered:0b}] is a command that detects not charged creeper.

Anyways, you would want to edit your command to execute at @e[type=minecraft:creeper,nbt={powered:0b}] run summon minecraft:lightning_bolt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .