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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 21w43a, 1.18.1, 22w06a, 22w15a, 1.19 Pre-release 4, 1.19, 1.19.4, 23w18a, 1.20.2, 23w44a, 1.20.5, 24w18a, 1.20.6
    • None
    • Community Consensus
    • Commands
    • Low
    • Platform

      The attribute minecraft:generic.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.
        /summon husk ~ ~1 ~ {Attributes:[{Name:"generic.attack_knockback",Base:5f}]}
        
      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.

            Unassigned Unassigned
            Chavamix700 syarumi
            Votes:
            7 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: