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

Hostile mobs can't replace armor they're wearing with better armor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19.4 Pre-release 4
    • 1.19.3, 23w04a, 23w05a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2
    • None
    • Confirmed
    • Mob behaviour
    • Important
    • Platform

      The bug

      When summoning a hostile mob creature that can pick up items, if they are equipped with armor, they cannot replace the armor already equipped. They can only replace any items in their hand. All mobs that can wear armor have this problem. The previous version (1.19.2) does not have this problem.

      How to reproduce

      1. Summon a skeleton and use data command set "CanPickUpLoot" to 1b like:
        /data modify entity @e[type=minecraft:skeleton,distance=..10,limit=1] CanPickUpLoot set value 1b
      2. Give it basic armor, for example, leather material.
      3. Give it advanced armor like diamond.
      4. You can see it replaced its bow with advanced armor.
      5. If you give it a sword, it will keep picking up and replacing the items on its hand.

      Expected behavior

      If a mob that can pick up items picks up a type of armor that is better than what it is currently wearing, it should remove what it's wearing and put on the new better armor.

      Observed behavior

      If a mob that can pick up items picks up a type of armor that is better than what it is currently wearing, it will hold the better armor in its hand and continue to wear the inferior armor.

       

            Karaoglu [Mojang] Nilay Karaoglu
            xiaofan7520 xiaofan7520
            Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: