Version: 1.21.8
Entities that spawn with equipment such as Skeletons cannot have their equipment changed at all (unless they're apart of another mob as a passenger such as the Ghostly Horseman).
If we take Bob as an example, Bob works fine as zombies can't spawn with equipment.
group(type=difficulty,ID=hard;type=entity,ID=zombie,NBTTag=(
equipment=(
mainhand=(id=diamond_sword,count=1,components=(enchantments=#luckySwordEnchantments)),
feet=(id=diamond_boots,count=1,components=(enchantments=#luckyBootsEnchantments)),
legs=(id=diamond_leggings,count=1,components=(enchantments=#luckyLeggingsEnchantments)),
chest=(id=diamond_chestplate,count=1,components=(enchantments=#luckyChestplateEnchantments)),
head=(id=diamond_helmet,count=1,components=(enchantments=#luckyHelmetEnchantments))
),
drop_chances=(mainhand=0.5f,feet=0.3f,legs=0.3f,chest=0.3f,head=0.3f),
CustomName=(text="Bob",color=blue,bold=true),CustomNameVisible=true)
)@luck=-2
However, if we replace the ID=zombie with ID=skeleton
group(type=difficulty,ID=hard;type=entity,ID=skeleton,NBTTag=(
equipment=(
mainhand=(id=diamond_sword,count=1,components=(enchantments=#luckySwordEnchantments)),
feet=(id=diamond_boots,count=1,components=(enchantments=#luckyBootsEnchantments)),
legs=(id=diamond_leggings,count=1,components=(enchantments=#luckyLeggingsEnchantments)),
chest=(id=diamond_chestplate,count=1,components=(enchantments=#luckyChestplateEnchantments)),
head=(id=diamond_helmet,count=1,components=(enchantments=#luckyHelmetEnchantments))
),
drop_chances=(mainhand=0.5f,feet=0.3f,legs=0.3f,chest=0.3f,head=0.3f),
CustomName=(text="Bob",color=blue,bold=true),CustomNameVisible=true)
)@luck=-2
It spawns with an unenchanted bow.
This has been tested on multiple mobs such as zombified piglin, wither skeletons, vexes, vindicators, and a few more all of which did not spawn with enchanted items.
Version: 1.21.8
Entities that spawn with equipment such as Skeletons cannot have their equipment changed at all (unless they're apart of another mob as a passenger such as the Ghostly Horseman).
If we take Bob as an example, Bob works fine as zombies can't spawn with equipment.
However, if we replace the ID=zombie with ID=skeleton
It spawns with an unenchanted bow.
This has been tested on multiple mobs such as zombified piglin, wither skeletons, vexes, vindicators, and a few more all of which did not spawn with enchanted items.