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

Switching between items in the same tick as an attack can cause one item's attribute modifiers to be applied on another

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21.4
    • None
    • Unconfirmed
    • (Unassigned)

      What I expected to happen was...:
      When hotkey-ing to an item in the same tick you attack, the attributes modifiers of the new item are applied and the new item (if applicable) would lose durability.

      What actually happened was...:
      When hotkey-ing to an item in the same tick you attack, the attribute modifiers of the old item (the one you switched from) are applied while the new item (if applicable) would lose durability and have its enchantments apply

      Steps to Reproduce:
      1. Go to survival
      2. Take any item that can lose durability
      3. Attack any entity, and, at the exact moment you attack, switch to an empty hotbar slot by using a hotkey

      Attached are videos of me abusing this bug to do several things:
      Attack with a diamond sword without losing durability
      Use a netherite axe's attack damage attribute with a mace's breach and fire aspect enchantments to bypass armor while dealing the damage you'd expect from a netherite axe

      I've also attached a .nbt file of the structure I used to test for anyone who wants to test it using my setup

        1. test-1.nbt
          5 kB
          MyShampooIsDrunk
        2. no dura dia sword.mp4
          4.75 MB
          MyShampooIsDrunk
        3. breach fire aspect axe.mp4
          7.72 MB
          MyShampooIsDrunk

            Unassigned Unassigned
            MyShampooIsDrunk MyShampooIsDrunk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: