The damage animation is played (both in first-person and in third-person) when the health boost effect is removed in creative or spectator mode
Do also note that this happens in survival as well. I did not count it as you are actually losing health in survival, but thought I'd mention it in case I'm wrong
Steps to reproduce:
Run this command in creative mode: /effect give @p minecraft:health_boost 1
Notice when the effect runs out the damage animation is played
Expected behavior:
Nothing would happen because the player is in creative/spectator mode
Thank you for your report!
We're actually already tracking this issue in MC-42000, so this ticket is being resolved and linked as a duplicate.
However, that ticket has been resolved as working as intended, which means that this will not be fixed as it is not considered a bug.
Please be sure to use the search feature before creating a ticket to see if the issue has already been reported.
Quick Links:
📓 Bug Tracker Guidelines – 🛠 Community Support – 📧 Mojang Support – ✍️ Feedback and Suggestions – 💬 Mojira Discord