entity_hurt_player advancement trigger is triggered for non-entity damage but entity_killed_player is not
The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the attached datapack MC-116922.zip
and place it in the datapacks directory of your world folder - Load the world (or if it's already opened run /reload)
- Take fire damage
→ You get the advancement "Taking damage" - Die because of fire damage
→ You do not get the advancement "Being killed"
Linked Issues
Created Issue:
entity_hurt_player advancement trigger is triggered for non-entity damage but entity_killed_player is not
The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the the attached advancements [^player_hurt.json] and [^player_killed.json] and place them in the following directory of your world folder
data\advancements\custom- Load the world
- Take fire damage
→ You get the advancement "Taking damage"- Die because of fire damage
→ You do not get the advancement "Being killed"
The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the
theattached advancements [^player_hurt.json] and [^player_killed.json] and place them in the following directory of your world folderdata\advancements\custom- Load the world
- Take fire damage
→ You get the advancement "Taking damage"- Die because of fire damage
→ You do not get the advancement "Being killed"
The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the attached
advancements[^player_hurt.json]and [^player_killed.json] and place them in the following directory of your world folderdata\advancements\custom- Load the world
- Take fire damage
→ You get the advancement "Taking damage"- Die because of fire damage
→ You do not get the advancement "Being killed"The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the attached datapack MC-116922.zip
it in the datapacks directory of your world folder
- Load the world (or if it's already opened run /reload)
- Take fire damage
→ You get the advancement "Taking damage"- Die because of fire damage
→ You do not get the advancement "Being killed"
The bug
The advancement trigger entity_hurt_player is triggered when the player receives non-entity damage (like fire) as well but the trigger entity_killed_player is only triggered if the player is killed by an entity.
Note: If both triggers should trigger for non-entity damage as well it might be good to rename them to something like player_being_hurt and player_being_killed.
How to reproduce
- Download the attached datapack MC-116922.zip
and place it in the datapacks directory of your world folder
- Load the world (or if it's already opened run /reload)
- Take fire damage
→ You get the advancement "Taking damage"- Die because of fire damage
→ You do not get the advancement "Being killed"
is duplicated by
Thank you for your report!
We're tracking this issue in MC-116922, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Confirmed in 20w21a.
Here is a simple workaround that can be used in 20w18a and above.
Create a deathCount scoreboard objective with the following command:
Then, create an entity_hurt_player advancement with an entity_scores predicate condition that checks if the deathCount score increased:
{ "criteria": { "entity_killed_player": { "trigger": "entity_hurt_player", "conditions": { "player": [ { "condition": "entity_scores", "entity": "this", "scores": { "deathCount": 1 } } ] } } } }It works well if the player has to die only once for the advancement to be granted. If the advancement has to be revoked with a reward function, a simple rewards parameter with a function reward can be added after criteria.
The reward function should have the following minimum code:
Confirmed in 20w27a.