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

Mobs with CanPickUpLoot no longer pick up enchanted items after picking up an unenchanted item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w45a
    • 24w09a, 1.21, 24w33a, 1.21.1 Release Candidate 1, 1.21.1, 24w34a, 24w35a, 24w36a, 24w37a, 24w38a, 24w39a, 24w40a, 1.21.2 Pre-Release 1, 1.21.2 Pre-Release 2, 1.21.2 Pre-Release 3, 1.21.2 Pre-Release 4, 1.21.2 Pre-Release 5, 1.21.2 Release Candidate 1, 1.21.2 Release Candidate 2, 1.21.2, 24w44a, 1.21.3
    • None
    • Community Consensus
    • Mob behaviour
    • Important
    • Platform

      The Bug

      Mobs with CanPickUpLoot do not drop an item they are holding/wearing in favor of an enchanted item, unlike pre-1.20.5 behavior. For example, a zombie will not drop a netherite sword for a netherite sword enchanted with Sharpness. This also occurs with armor.

      This bug was introduced in 24w09a.

      Steps to Reproduce

      1. Summon a husk that can pick up loot:
        /summon minecraft:husk ~ ~ ~ {CanPickUpLoot:1b}
      2. Throw the husk a sword.
      3. Once the husk has picked up the sword, throw it a sword (of the same type) enchanted with Sharpness.
      4. Note how the husk does not pick up the enchanted sword. 1.21.mp4
      5. Attempting this in 1.20.4 shows the correct behavior, where the husk prefers the enchanted sword to the unenchanted sword. 1.20.4.mp4

      Additional Notes

      Related to MC-273450 and MC-193176.

        1. 1.20.4.mp4
          7.33 MB
        2. 1.21.mp4
          7.59 MB
        3. 2024-10-11_14.42.44.png
          2024-10-11_14.42.44.png
          546 kB
        4. skeleton-bug-no-bows-small.mp4
          5.81 MB

            Dat12 [Mojang] etanaratsastaja
            Viradex Viradex
            Votes:
            17 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: