mojira.dev
MC-302295

Instant Damage and Instant Health from non-command sources cannot be detected

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 2

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_player and player_hurt_entity advancement 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 the Owner of the splash potion to be a player’s UUID and use player_hurt_entity.

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

Special TT

(Unassigned)

Confirmed

(Unassigned)

1.21.8, 1.21.10 Release Candidate 1

Retrieved