#data modify entity @s Item set value
#data modify entity @s Item set value {id:"minecraft:book",Count:1b,tag:{kyutrinket:1b,kyuxptrinket:1b,display:{Name:"{\"text\":\"Pure Unrefined Knowledge\"}",Lore:["\"Passively grants xp, and gives additional\"","\"experience when killing mobs.\"","\"\"","\"'You know what I like a lot more than xp? KNOWLEDGE.'\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10}]}}
execute at @s positioned ~ ~4504 ~ run loot spawn ~ ~ ~ loot minecraft:customitems/pureunrefinedknowledge
execute at @s positioned ~ ~4504 ~ run data modify entity @s Item set from entity @e[type=item,limit=1,sort=nearest,distance=..5] Item
execute at @s positioned ~ ~4504 ~ run kill @e[type=item,sort=nearest,distance=..5]

execute at @s run execute at @e[name=CadeyrnCrafting,sort=nearest,limit=1] run tellraw @a[distance=..4] ["",{"text":"Item crafted: Pure Unrefined Knowledge.","color":"#8B59FF","italic":true}]


execute at @s run kill @e[limit=4,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:book",Count:1b}},nbt=!{Item:{tag:{kyutrinket:1b}}}]
execute at @s run kill @e[limit=2,distance=..5,type=item,tag=!SaveMe,nbt={Item:{id:"minecraft:gold_block",Count:1b}}]
execute at @s run kill @e[limit=2,distance=..5,type=item,tag=!SaveMe,nbt={Item:{Count:1b,tag:{kyusheet:1b}}}]

