Mojira Archive
MC-32578

Attribute "knockback_resistance" ineffective against explosions

The bug

Giving an item a knockback_resistance attribute (set to 100%) will properly protect against forms of knockback such as melee/ranged damage, the Knockback/Punch enchantments and fall damage.

However, when faced against explosions caused by TNT, creepers, beds, or Ghast fireballs, the player is still knocked back as if they have no resistance.

How to reproduce

  1. Ensure you are in survival or adventure mode:
    /gamemode survival
  2. Give yourself 100% knockback resistance:
    /attribute @s generic.knockback_resistance base set 1
  3. Give yourself 100% damage resistance (for easier testing):
    /effect give @s resistance 1000 4 true
  4. Summon a pillager and allow it to attack you:
    /summon pillager

    You are not knocked back by the pillager's arrows

  5. Summon a creeper and allow it to explode next to you:
    /summon creeper

    You are knocked back by the explosion