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

Attribute minecraft:generic.attack_knockback and minecraft:generic.flying_speed don’t work on all entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 20w17a, 20w18a, 20w19a, 20w20a, 20w20b, 20w21a, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2
    • None
    • Community Consensus
    • Commands
    • Low

      You can use the minecraft:generic.attack_knockback attribute to change the attack knockback of a mob. But if you try to do this with players it does not work. It says entity name has no Attribute Attack Knockback. For mobs it works fine. 

      How to reproduce: 

      Run this command: /attribute @s minecraft:generic.attack_knockback base set 0 

      It fails.
      minecraft:generic.flying_speed has the same issue.
      It seems like minecraft:generic.flying_speed also does not work on mobs.

      This also doesn’t work if you have the attribute on an item. You can for example use this command:/give @p minecraft:stick{AttributeModifiers:[

      {AttributeName:"generic.attack_knockback",Name:"generic.attack_knockback",Amount:10,Operation:0,UUID:[I;5,5,5,5],Slot:"mainhand"}

      ]} 1 and the attribute of the item will only work on mobs.

            Unassigned Unassigned
            bugsbugsbugs bugsbugsbugs
            Votes:
            12 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: