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
Ensure you are in survival or adventure mode:
/gamemode survival
Give yourself 100% knockback resistance:
/attribute @s generic.knockback_resistance base set 1
Give yourself 100% damage resistance (for easier testing):
/effect give @s resistance 1000 4 true
Summon a pillager and allow it to attack you:
/summon pillager
→ ✔ You are not knocked back by the pillager's arrows
Summon a creeper and allow it to explode next to you:
/summon creeper
→ ❌ You are knocked back by the explosion
Linked issues
relates to 2
Attachments
Comments


Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
No response for over a year.
Confirmed in 1.9.1-pre3. Probably intended.
Confirmed for 1.9.2.
Confirmed up through 17w06a.

Affects up to 18w10d.

Affects 1.13-pre6. Please keep the issue updated accordingly.
Also, change the example command to
/give @a bedrock{
AttributeModifiers:[
{
AttributeName:generic.knockbackResistance,
Name:generic.knockbackResistance,
Amount:1,
Operation:0,
UUIDMost:10,
UUIDLeast:10
}
]
}
as that is proper format for 1.13.
Can confirm for 1.13.2 and 19w03c
Can you reproduce this bug in 1.16 pre release 5?

Confirmed in 1.16.1 and 20w28a. Updated command:
/attribute @s generic.knockback_resistance base set 1
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a. Video attached.
Can confirm in 1.16.5 and 21w08b.

This is a feature request.
The Blast Protection enchantment supposedly reduces explosion knockback...