Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-272930

Critical hits don't take enchantments into account

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21 Pre-Release 2
    • None
    • Unconfirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            AHL AHL
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: