#Sound
playsound custom.spell.cast ambient @a ~ ~ ~
execute if predicate items_py:selected/egg_wand run playsound custom.chicken.egg.no_subtitle ambient @a ~ ~ ~

#Summon empty Spell
execute if predicate items:selected/wand/use/arch run function items:wand/0_cast/use/arch
execute if predicate items:selected/wand/use/click_keep run tag @s add click_keep
execute if predicate items:selected/wand/use/click_keep run scoreboard players set @s ch_cooldown 0
execute if predicate items:selected/wand/use/instant run function items:wand/instant/0_sort

#Cost
execute unless predicate items:selected/wand/use/click_keep run scoreboard players operation @s mana -= @s cast_cost
