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

Knockback effect is not transfered in the /damage command when specified attacker holds an item with the knockback enchantment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.19.4
    • None
    • Confirmed
    • Commands

      The issue:

      Holding a weapon with knockback and using the /damage command and specifying the source player inflicts knockback, but not the knockback from your enchantment.

      Reproduction Steps:

      1) Summon an example entity: /summon creeper ~ ~ ~

      {Tags:["test"]}

      2) Give yourself a sword with high knockback to ensure this behavior: /give @s iron_sword{Enchantments:[

      {id:"minecraft:knockback",lvl:10s}

      ]}

      3) Use the damage command on the creeper: /execute as @e[type=creeper,tag=test] run damage @s 1 generic by @p

      4) Take note as the creeper takes small amount of knockback, as if it was attacked without an item enchanted by knockback

      What is happening:

      The creeper takes small knockback as if it was attacked with an item that does not have the knockback enchantment.

      What should be happening:

      The creeper would take the correct amount of knockback corresponding to that of the knockback enchantment level on the item the player is holding.

            Unassigned Unassigned
            snaplingdd Snap Doomy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: