mojira.dev
MC-235198

Mobs with attack_knockback attribute don't apply knockback to players blocking with a shield

The attribute minecraft:attack_knockback doesn't seem to be working in a consistent way when applying knockback to attacks blocked by a shield. If a mob has any value of attack knockback above 0, the knockback applied to a player blocking isn't proportional to the attribute value. Normal hits work as expected (but for some mobs don't, see MC-269226).

This is not consistent with ravagers and hoglins/zoglins, which have an attack knockback base value above 0 and deal knockback to players blocking with a shield.

How to reproduce

  1. Summon a husk with an attack_knockback of 5, switch to survival.

    /execute summon minecraft:husk run attribute @s minecraft:attack_knockback base set 5
  2. ✔ The husk attacks you applying high knockback to you.

  3. ❌ If you are blocking with a shield, the husk doesn't apply any knockback.

Expected result
Mobs with an attack knockback value above 0 would knockback players blocking with a shield, like ravagers and hoglins/zoglins.

Observed result
Mobs with attack knockback don't deal increased knockback to players blocking, despite normal hits doing so.

Linked issues

Comments

Avoma

I can confirm this. Also affects 21w43a.

Jukitsu

Relates to MC-147694

AndyJohns

Isn't the shield meant to block attacks? If so, why is this unresolved? It makes sense for the shield to block knockback. I assume this is going to have a resolution of "Works as Intended"

syarumi

It's meant to block attacks, yes, but this attribute overrides the knockback resistance of the shield, so in that way ravagers, hoglins/zoglins and wardens can deal you knockback while blocking. This behavior is also a mechanic and not a bug, judging by the triage of MC-217567.

syarumi

I've generalized this report a little so it doesn't cover many issues at once. The other issues have been reported into MC-271698 and MC-271699 respectively. This report still covers the main issue, so I don't think it should affect the triage status so much.

syarumi

(Unassigned)

Community Consensus

Platform

Low

Commands

1.17.1, 21w43a, 1.18.1, 22w06a, 22w15a, ..., 1.20.5, 1.20.6, 24w18a, 1.21.3, 1.21.4 Pre-Release 3

Retrieved