#/data get entity @e[type=item,limit=1,sort=nearest,nbt={Tags:["minecraft:sharpness"]}] Tags
#execute at @s[nbt=!{Item:{tag:{kyuxptrinket:1b}}}] run execute if entity @e[nbt={Item:{tag:{kyuxptrinket:1b}}},limit=1,distance=..5] run execute at @s run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..4] ["",{"text":"Your trinket holder now has the 'Pure Unrefined Knowledge ' effect!","color":"#8B59FF","italic":true}]
#am I going crazy? appending or merging enchantments doesn't work at all -_-
#...anyways, just checks all the enchantments slots for either Sharpness, BoA, or Smite, and gives it a tag based on the slot it is in
#data merge entity @s {Tags:[]}
tag @s add a
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[0].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch0
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch0] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[1].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch1
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch1] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[2].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch2
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch2] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[3].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch3
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch3] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[4].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch4
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch4] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[5].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch5
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch5] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[6].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch6
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch6] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[7].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch7
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch7] add FoundSpecEnch
data modify entity @s[tag=!FoundSpecEnch] Tags append from entity @s[tag=!FoundSpecEnch] Item.tag.Enchantments[8].id
execute as @s[tag=!FoundSpecEnch] run execute unless entity @s[nbt=!{Tags:["minecraft:sharpness"]},nbt=!{Tags:["minecraft:smite"]},nbt=!{Tags:["minecraft:bane_of_arthropods"]}] run tag @s[tag=!FoundSpecEnch] add FoundSpecEnch8
tag @s[tag=!FoundSpecEnch,tag=FoundSpecEnch8] add FoundSpecEnch


tag @s[nbt={Item:{tag:{Enchantments:[{id:"minecraft:sharpness"}]}}}] add SharpEnch
tag @s[nbt={Item:{tag:{Enchantments:[{id:"minecraft:smite"}]}}}] add SmiteEnch
tag @s[nbt={Item:{tag:{Enchantments:[{id:"minecraft:bane_of_arthropods"}]}}}] add BaneEnch
tag @s add AmTrident

#brain be dead don't judge
execute as @s[tag=!SmiteEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:5s, id:"minecraft:sharpness"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsharpness
execute as @s[tag=!SmiteEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:4s, id:"minecraft:sharpness"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsharpness
execute as @s[tag=!SmiteEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:3s, id:"minecraft:sharpness"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsharpness
execute as @s[tag=!SmiteEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:2s, id:"minecraft:sharpness"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsharpness
execute as @s[tag=!SmiteEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:1s, id:"minecraft:sharpness"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsharpness


execute as @s[tag=!SharpEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:5s, id:"minecraft:smite"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsmite
execute as @s[tag=!SharpEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:4s, id:"minecraft:smite"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsmite
execute as @s[tag=!SharpEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:3s, id:"minecraft:smite"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsmite
execute as @s[tag=!SharpEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:2s, id:"minecraft:smite"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsmite
execute as @s[tag=!SharpEnch,tag=!BaneEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:1s, id:"minecraft:smite"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentsmite


execute as @s[tag=!SmiteEnch,tag=!SharpEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:5s, id:"minecraft:bane_of_arthropods"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentbane
execute as @s[tag=!SmiteEnch,tag=!SharpEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:4s, id:"minecraft:bane_of_arthropods"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentbane
execute as @s[tag=!SmiteEnch,tag=!SharpEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:3s, id:"minecraft:bane_of_arthropods"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentbane
execute as @s[tag=!SmiteEnch,tag=!SharpEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:2s, id:"minecraft:bane_of_arthropods"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentbane
execute as @s[tag=!SmiteEnch,tag=!SharpEnch,tag=!GotEnchanted] run execute at @s run execute as @e[limit=1,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:1s, id:"minecraft:bane_of_arthropods"}]}}}] run function zzzzdonotuse:modifyarmor/weapons/tridentbane


#execute at @s run kill @e[distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{id:"minecraft:knockback"}]}}},limit=4]

#execute unless entity @e[distance=..5,limit=1,tag=DepthSItem] run execute as @s[nbt={Item:{Count:1b,tag:{Enchantments:[{lvl:3s,id:"minecraft:depth_strider"}]}}}] run tag @s add DepthSItem
