A creature receiving Instant Damage and Instant Health from a source other than a command cannot be detected through NBT checks or predicate checks.
For example:
Use a repeating command block to execute this command:
execute as @e[nbt={active_effects:[{id:"minecraft:instant_damage"}]}] run say magic damage
If the player drinks a potion of instant damage at this time, the player will not say "magic damage".
Comments 0
No comments.