mojira.dev
MC-298686

Skeletons don't pick up swords from 1.21.4

Even when a skeleton have the tag CanPickUpLoot is not picking swords. After testing a bit it looks like it’s from the change in the 1.21.4

1.21.4

24w45a

Prefer to pick bows from the ground as opposed to other items.

The Skeleton still pick Armor or Enchanted bows but they are not able to pick up swords as they did in the previous versions.
Unless I’m missing something the skeleton should have preference to pick up a bow (item) but still able to pick up swords if it didn’t pickup any bow before.

Environment

0. Test in 1.21.4 or 1.21.5
1. Spawn a skeleton with the tag (/give @p skeleton_spawn_egg[entity_data={id:skeleton,CanPickUpLoot:1b}] 1)
2. Drop a Sword at the ground.
3. Check if it's picking it up.
4. Drop another equipable item for the skeleton to confirm that is able to pick up items.
5. Do the same process in 1.21.3 or lower to see the discrepancies.

Linked issues

Attachments

Comments 4

I checked it out. It also works on version 1.21.6 Release Candidate 1

It also works on version 1.21.6

Just as a note to reinforce the argument that is not intended to work as it is in the latter versions; I just realized that when they have the CanPickUpLoot tag they are able to pickup shields. Which doesn’t make much sense if they are unable to pick up swords.

[media]

As 24w25a, skeletons always prefer bows to swords; if they have a bow in their main hand they will not swap it for a sword. They will only pick up a sword if they are not holding anything in their main hand, or if they are holding some random item they don’t care about.

nemf

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5

Retrieved