mojira.dev
MC-272930

Critical hits don't take enchantments into account

Take a wooden sword and enchant it with sharpness 5.
Spawn a creeper and get its health with the following command:

/data get entity @n[type=minecraft:creeper] Health

It has 20 HP.

Hit the creeper with your sword and get its health again.
It has lost 7 HP: 4 from the sword and 3 from the sharpness.

Hit the creeper with a critical hit and get its health again.
It should have lost 10.5 HP: 7 as before and 50% more from the critical hit.
Instead, it has lost only 9 HP: 4 from the sword, 3 from the sharpness, and 50% of the sword's base damage from the critical hit.

The same issue happens for other values, other enchantments, other tools and on other mobs.
A smite 100 netherite axe deals (10+2.5×100)×(1-0.8/25)=251.68 damage to a wither without critical hit and should deal 251.68×1.5=377.52 damage with the critical hit, but instead deals only 251.68+10/2=256.68 damage.
A tool with a custom enchantment made to deal 0 damage indeed deals 0 damage without critical hit, should also deal 0 damage with the critical hit, but instead deals half the tool's base damage.

Linked issues

Comments 1

Thank you for your report!
We're tracking this issue in MC-272004, 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 (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

AHL

(Unassigned)

Unconfirmed

(Unassigned)

1.21 Pre-Release 2

Retrieved