Description:
Starting from the 26.2 snapshots, skeleton AI tends to break when it equips any item, either with commands or naturally on the ground.
Steps to Reproduce:
Spawn a skeleton.
Engage it in combat with a player.
While it is fighting, run:
/item replace entity @e[type=skeleton,limit=1,sort=nearest] weapon.mainhand with minecraft:stone_sword
Expected Result:
The skeleton should continue fighting normally using melee behavior.
Actual Result:
The skeleton’s AI breaks and it becomes immobile. It does not attack or move until the player restarts the game.
Additional Notes:
This bug is especially problematic for datapacks and mods where the skeleton’s weapon changes dynamically depending on the distance to the player.
This issue appears in the 26.2 snapshots, while in 26.1 the behavior works correctly.
Thank you for helping us improve Minecraft! We saved your files: