The name of the advancement trigger player_hurt_entity suggests that it is triggered when the player damages any entity. Instead it is only triggered when the player hurts a mob.
- Download the attached datapack MC-117824.zip and place it in the datapacks folder of your world
- Load the world
- Hit for example an armor stand or a boat
The advancement is not made
- Hit for example a pig
The advancement is made