I want that a mob take damage if it have the water_breathing potion effect.

/effect @e[<mob with water_breathing>] instant_damage 1 1

So, how I execute a command in a mob with a specific potion effect?

2 Answers 2


You will need to assign a label based on the mob's NBT data using /scoreboard first, and then target based on that label:

/scoreboard players tag @e[type=Creeper,tag=wb] remove wb
/scoreboard players tag @e[type=Creeper] add wb {ActiveEffects:[{Id:13b}]}

/effect @e[type=Creeper,tag=wb] minecraft:instant_damage 1 1

This can be done in just one command in Minecraft 1.13

/effect give @e[type=creeper,nbt={ActiveEffects:[{Id:13b]}] instant_damage 1 1

You must log in to answer this question.

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