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 damageIf the player drinks a potion of instant damage at this time, the player will not say "magic damage".
Comments 2
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki
This seems more like an implementation detail than a bug. Storing this information in NBT and then immediately removing it would incur a performance penalty and would have no benefit other than enabling this specific behavior. If you want to detect when a player damages or is damaged by another player or mob using splash harming, the
entity_hurt_playerandplayer_hurt_entityadvancement triggers will work just fine. To detect mob-on-mob splash harming, assuming you donβt care about player statistics or mob loot/XP, modify theOwnerof the splash potion to be a playerβs UUID and useplayer_hurt_entity.