How to summon lightning bolt at normal (and not charged) creepers only?



  • 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.



  • 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



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2