data modify storage runechant_crafting1 runechant set from entity @e[distance=0.01..1,sort=random,limit=1]
data modify storage runechant_crafting2 runechant set from entity @e[distance=0.01..1,sort=random,limit=1]

execute if data storage minecraft:runechant_entity {runechant:{Item:{id:"minecraft:paper",Count:1b,tag:{CustomModelData:199716}}}} if data storage minecraft:runechant_crafting1 {runechant:{Item:{id:"minecraft:diamond",Count:1b}}} run function runechant:mob/items/special/enchanted_diamond_craft

data remove storage minecraft:runechant_crafting1 runechant
data remove storage minecraft:runechant_crafting2 runechant