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

Attack Knockback attribute doesn't work on items.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 20w17a
    • None
    • Unconfirmed
    • Commands

      This one is quite simple; Although generic.attack_knockback is a perfectly valid attribute, it can only be used as a base attribute for mobs, and does not currently work with items.

      /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
      

      The command above gives the nearest player a stick which increases Attack Knockback by 10, however, when using the stick as a weapon, the extra knockback does not apply, although the description does say "+10 Attack Knockback".

            Unassigned Unassigned
            Rifcleous nottellingyou
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: