
execute at @s unless block ~ ~ ~ minecraft:trapped_chest run function next_level:custom_blocks/crystal_ball/drop
execute at @s run function next_level:custom_blocks/crystal_ball/gui
execute as @e[type=minecraft:item,nbt={Item:{tag:{nl_WriteRecipe:1b}}}] run kill @s

execute as @a[scores={nl.Recipe=1..}] run function next_level:give/detect_recipe

execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:diamond_sword{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:diamond_pickaxe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:diamond_axe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:diamond_shovel{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:diamond_hoe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:iron_sword{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:iron_pickaxe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:iron_axe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:iron_shovel{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:iron_hoe{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:bow{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:shield{nl_WriteRecipe:1b} 0

execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:leather_helmet{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:leather_chestplate{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:leather_leggings{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:leather_boots{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:carved_pumpkin{nl_WriteRecipe:1b} 0

execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:suspicious_stew{nl_WriteRecipe:1b} 0

execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:blaze_rod{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:compass{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:clock{nl_WriteRecipe:1b} 0
execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:book{nl_WriteRecipe:1b} 0

execute as @a[scores={nl.Recipe=..0}] store result score @s nl.Recipe run clear @s minecraft:carrot_on_a_stick{nl_WriteRecipe:1b} 0

