#data modify entity @s[tag=!FoundSharpEnch] Tags append from entity @s[tag=!FoundSharpEnch] Item.tag.StoredEnchantments[0].id
#execute as @s[tag=!FoundSharpEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]}] run tag @s[tag=!FoundSharpEnch] add FoundSharpEnch0
#tag @s[tag=!FoundSharpEnch,tag=FoundSharpEnch0] add FoundSharpEnch
#data modify entity @s[tag=!FoundSharpEnch] Tags append from entity @s[tag=!FoundSharpEnch] Item.tag.StoredEnchantments[1].id
#execute as @s[tag=!FoundSharpEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]}] run tag @s[tag=!FoundSharpEnch] add FoundSharpEnch1
#tag @s[tag=!FoundSharpEnch,tag=FoundSharpEnch1] add FoundSharpEnch
#data modify entity @s[tag=!FoundSharpEnch] Tags append from entity @s[tag=!FoundSharpEnch] Item.tag.StoredEnchantments[2].id
#execute as @s[tag=!FoundSharpEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]}] run tag @s[tag=!FoundSharpEnch] add FoundSharpEnch2
#tag @s[tag=!FoundSharpEnch,tag=FoundSharpEnch2] add FoundSharpEnch
#data modify entity @s[tag=!FoundSharpEnch] Tags append from entity @s[tag=!FoundSharpEnch] Item.tag.StoredEnchantments[3].id
#execute as @s[tag=!FoundSharpEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]}] run tag @s[tag=!FoundSharpEnch] add FoundSharpEnch3
#tag @s[tag=!FoundSharpEnch,tag=FoundSharpEnch3] add FoundSharpEnch

#store the level in a tag as well
tag @s[nbt={Item:{tag:{StoredEnchantments:[{lvl:5s, id:"minecraft:sharpness"}]}}}] add SH5
tag @s[nbt={Item:{tag:{StoredEnchantments:[{lvl:4s, id:"minecraft:sharpness"}]}}}] add SH4
tag @s[nbt={Item:{tag:{StoredEnchantments:[{lvl:3s, id:"minecraft:sharpness"}]}}}] add SH3
tag @s[nbt={Item:{tag:{StoredEnchantments:[{lvl:2s, id:"minecraft:sharpness"}]}}}] add SH2
tag @s[nbt={Item:{tag:{StoredEnchantments:[{lvl:1s, id:"minecraft:sharpness"}]}}}] add SH1

#data modify entity @s[tag=FoundSharpEnch0] Tags append from entity @s Item.tag.StoredEnchantments[0].lvl
#data modify entity @s[tag=FoundSharpEnch1] Tags append from entity @s Item.tag.StoredEnchantments[1].lvl
#data modify entity @s[tag=FoundSharpEnch2] Tags append from entity @s Item.tag.StoredEnchantments[2].lvl
#data modify entity @s[tag=FoundSharpEnch3] Tags append from entity @s Item.tag.StoredEnchantments[3].lvl

execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness"}]}}}] add NoSharp
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:5s,id:"minecraft:sharpness"}]}}}] add Sharp5
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:4s,id:"minecraft:sharpness"}]}}}] add Sharp4
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:3s,id:"minecraft:sharpness"}]}}}] add Sharp3
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:2s,id:"minecraft:sharpness"}]}}}] add Sharp2
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:1s,id:"minecraft:sharpness"}]}}}] add Sharp1
#yes, really, I need a second set because of "lvl:5" and "lvl:5s"
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt=!{Item:{tag:{Enchantments:[{id:"minecraft:sharpness"}]}}}] add NoSharp
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:5,id:"minecraft:sharpness"}]}}}] add Sharp5
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:4,id:"minecraft:sharpness"}]}}}] add Sharp4
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:3,id:"minecraft:sharpness"}]}}}] add Sharp3
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:2,id:"minecraft:sharpness"}]}}}] add Sharp2
execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,nbt={Item:{tag:{Enchantments:[{lvl:1,id:"minecraft:sharpness"}]}}}] add Sharp1

execute at @s run tag @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident] add GotEnchanted


execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=NoSharp] run data modify entity @s Item.tag.Enchantments append value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH5] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5] run kill @s


execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=NoSharp] run data modify entity @s Item.tag.Enchantments append value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4] run kill @s

execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=Sharp4,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:5, id:"minecraft:sharpness"}
execute at @s[tag=SH4] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=Sharp4] run kill @s

execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=NoSharp] run data modify entity @s Item.tag.Enchantments append value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @s run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3] run kill @s

execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=Sharp3,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:4, id:"minecraft:sharpness"}
execute at @s[tag=SH3] run execute as @s run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=Sharp3] run kill @s



execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=NoSharp] run data modify entity @s Item.tag.Enchantments append value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2] run kill @s


execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:3, id:"minecraft:sharpness"}
execute at @s[tag=SH2] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=Sharp2] run kill @s


execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=NoSharp] run data modify entity @s Item.tag.Enchantments append value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:1, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=!Sharp1] run kill @s

execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch0] run data modify entity @s Item.tag.Enchantments[0] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch1] run data modify entity @s Item.tag.Enchantments[1] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch2] run data modify entity @s Item.tag.Enchantments[2] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch3] run data modify entity @s Item.tag.Enchantments[3] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch4] run data modify entity @s Item.tag.Enchantments[4] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch5] run data modify entity @s Item.tag.Enchantments[5] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch6] run data modify entity @s Item.tag.Enchantments[6] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch7] run data modify entity @s Item.tag.Enchantments[7] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute as @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!NoSharp,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1,tag=FoundSpecEnch8] run data modify entity @s Item.tag.Enchantments[8] set value {lvl:2, id:"minecraft:sharpness"}
execute at @s[tag=SH1] run execute at @e[type=item,limit=1,sort=nearest,distance=..5,tag=AmTrident,tag=!Sharp5,tag=!Sharp4,tag=!Sharp3,tag=!Sharp2,tag=Sharp1] run kill @s

