mojira.dev
MC-198809

Blast Protection does not reduce explosion knockback except at very high levels

The bug

Blast Protection does not reduce knockback from explosions, unless the enchantment level is very high (much higher than can be attained through Survival) and the wearer is close to the source of the explosion.

To reproduce

  • Change to survival or adventure mode, and give yourself a high amount of Resistance (e.g. effect give @s minecraft:resistance 1000000 4 true) to avoid dying from explosions

  • Enchant at least one piece of diamond (or other non-Netherite) armor with Blast Protection IV

    • Note that only the highest level of Blast Protection across all armor pieces affects knockback

  • Spawn a creeper or ignite TNT, and compare the explosion knockback while wearing the armor to without

  • Give yourself armor with Blast Protection 9:

    give @s diamond_chestplate{Enchantments:[{id:"minecraft:blast_protection",lvl:9s}]} 1
  • Stand next to the exploding creeper/TNT and notice that you take minimal knockback. Stand a few blocks away, and you will experience much greater knockback.

This can also be reproduced on mobs wearing Blast Protection armor, such as in the attached testing world.

Code analysis

In net.minecraft.world.item.enchantment.ProtectionEnchantment.getExplosionKnockbackAfterDampener(), the amount of knockback reduction is original knockback * enchantment level * 0.15, rounded down to the nearest integer. The amount of knockback from an explosion seems to be at most 1 (and is usually less as entities are usually not directly next to the explosion). As a result, the rounding always reduces the amount of reduction to 0, unless the blast protection level is high enough to produce a reduction greater than 1 (which is only achieved from level 7+).

Linked issues

Attachments

Comments

migrated

I can confirm for 1.16.3.

gaspoweredpick

Confirmed. The blast protection levels attainable in survival cannot reduce knockback, which is definitely a bug.

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 1.18.1.

Sonicwave

Fantastime

Confirmed

Enchantments, Entities

1.16.2, 1.16.3, 1.16.4, 20w48a, 21w03a, 1.18 Pre-release 4, 1.18, 1.18.1, 1.19.2

23w04a

Retrieved