execute at @e[tag=quest.enchanter,type=interaction] run stopsound @a[distance=..16] * minecraft:entity.villager.ambient
execute at @e[tag=quest.enchanter,type=interaction] run playsound minecraft:entity.villager.yes neutral @a
tellraw @s {"text": "> ", "extra": [{"translate": "quest.enchanter.enchanted","color":"green"}]}
execute at @s run playsound minecraft:block.enchantment_table.use player @a ~ ~ ~
advancement grant @s only ws:workersimulator/lordoftherings
execute if items entity @s weapon.mainhand ghast_tear[custom_data~{type:'amethyst'}] run return run item modify entity @s weapon.mainhand ws:enchanter/amethyst_ring
execute if items entity @s weapon.mainhand ghast_tear[custom_data~{type:'emerald'}] run return run item modify entity @s weapon.mainhand ws:enchanter/emerald_ring
execute if items entity @s weapon.mainhand ghast_tear[custom_data~{type:'ruby'}] run return run item modify entity @s weapon.mainhand ws:enchanter/ruby_ring
execute if items entity @s weapon.mainhand ghast_tear[custom_data~{type:'saphire'}] run return run item modify entity @s weapon.mainhand ws:enchanter/saphire_ring
item modify entity @s weapon.mainhand ws:enchanter/ring