execute store result score #Item nl.Reroll run data get block ~ ~ ~ Items.[{Slot:10b}].tag.nl_ItemID

# Amethyst # 
execute if score #Item nl.Reroll matches 7 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/sword
execute if score #Item nl.Reroll matches 8 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/pickaxe
execute if score #Item nl.Reroll matches 9 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/axe
execute if score #Item nl.Reroll matches 10 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/shovel
execute if score #Item nl.Reroll matches 11 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/hoe
execute if score #Item nl.Reroll matches 12 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/bow
execute if score #Item nl.Reroll matches 13 run loot replace block ~ ~ ~ container.10 loot next_level:tools/amethyst/shield
execute if score #Item nl.Reroll matches 49 run loot replace block ~ ~ ~ container.10 loot next_level:gear/amethyst/helmet
execute if score #Item nl.Reroll matches 50 run loot replace block ~ ~ ~ container.10 loot next_level:gear/amethyst/chestplate
execute if score #Item nl.Reroll matches 51 run loot replace block ~ ~ ~ container.10 loot next_level:gear/amethyst/leggings
execute if score #Item nl.Reroll matches 52 run loot replace block ~ ~ ~ container.10 loot next_level:gear/amethyst/boots
execute if score #Item nl.Reroll matches 73 run loot replace block ~ ~ ~ container.10 loot next_level:gear/amethyst/amulet

# Dark Quartz # 
execute if score #Item nl.Reroll matches 14 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/sword
execute if score #Item nl.Reroll matches 15 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/pickaxe
execute if score #Item nl.Reroll matches 16 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/axe
execute if score #Item nl.Reroll matches 17 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/shovel
execute if score #Item nl.Reroll matches 18 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/hoe
execute if score #Item nl.Reroll matches 19 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/bow
execute if score #Item nl.Reroll matches 20 run loot replace block ~ ~ ~ container.10 loot next_level:tools/smokey_quartz/shield
execute if score #Item nl.Reroll matches 53 run loot replace block ~ ~ ~ container.10 loot next_level:gear/dark_quartz/helmet
execute if score #Item nl.Reroll matches 54 run loot replace block ~ ~ ~ container.10 loot next_level:gear/dark_quartz/chestplate
execute if score #Item nl.Reroll matches 55 run loot replace block ~ ~ ~ container.10 loot next_level:gear/dark_quartz/leggings
execute if score #Item nl.Reroll matches 56 run loot replace block ~ ~ ~ container.10 loot next_level:gear/dark_quartz/boots
execute if score #Item nl.Reroll matches 74 run loot replace block ~ ~ ~ container.10 loot next_level:gear/dark_quartz/amulet

# Jade # 
execute if score #Item nl.Reroll matches 21 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/sword
execute if score #Item nl.Reroll matches 22 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/pickaxe
execute if score #Item nl.Reroll matches 23 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/axe
execute if score #Item nl.Reroll matches 24 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/shovel
execute if score #Item nl.Reroll matches 25 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/hoe
execute if score #Item nl.Reroll matches 26 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/bow
execute if score #Item nl.Reroll matches 27 run loot replace block ~ ~ ~ container.10 loot next_level:tools/jade/shield
execute if score #Item nl.Reroll matches 57 run loot replace block ~ ~ ~ container.10 loot next_level:gear/jade/helmet
execute if score #Item nl.Reroll matches 58 run loot replace block ~ ~ ~ container.10 loot next_level:gear/jade/chestplate
execute if score #Item nl.Reroll matches 59 run loot replace block ~ ~ ~ container.10 loot next_level:gear/jade/leggings
execute if score #Item nl.Reroll matches 60 run loot replace block ~ ~ ~ container.10 loot next_level:gear/jade/boots
execute if score #Item nl.Reroll matches 75 run loot replace block ~ ~ ~ container.10 loot next_level:gear/jade/amulet

# Topaz # 
execute if score #Item nl.Reroll matches 28 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/sword
execute if score #Item nl.Reroll matches 29 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/pickaxe
execute if score #Item nl.Reroll matches 30 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/axe
execute if score #Item nl.Reroll matches 31 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/shovel
execute if score #Item nl.Reroll matches 32 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/hoe
execute if score #Item nl.Reroll matches 33 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/bow
execute if score #Item nl.Reroll matches 34 run loot replace block ~ ~ ~ container.10 loot next_level:tools/topaz/shield
execute if score #Item nl.Reroll matches 61 run loot replace block ~ ~ ~ container.10 loot next_level:gear/topaz/helmet
execute if score #Item nl.Reroll matches 62 run loot replace block ~ ~ ~ container.10 loot next_level:gear/topaz/chestplate
execute if score #Item nl.Reroll matches 63 run loot replace block ~ ~ ~ container.10 loot next_level:gear/topaz/leggings
execute if score #Item nl.Reroll matches 64 run loot replace block ~ ~ ~ container.10 loot next_level:gear/topaz/boots
execute if score #Item nl.Reroll matches 76 run loot replace block ~ ~ ~ container.10 loot next_level:gear/topaz/amulet

# Ruby # 
execute if score #Item nl.Reroll matches 35 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/sword
execute if score #Item nl.Reroll matches 36 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/pickaxe
execute if score #Item nl.Reroll matches 37 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/axe
execute if score #Item nl.Reroll matches 38 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/shovel
execute if score #Item nl.Reroll matches 39 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/hoe
execute if score #Item nl.Reroll matches 40 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/bow
execute if score #Item nl.Reroll matches 41 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ruby/shield
execute if score #Item nl.Reroll matches 65 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ruby/helmet
execute if score #Item nl.Reroll matches 66 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ruby/chestplate
execute if score #Item nl.Reroll matches 67 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ruby/leggings
execute if score #Item nl.Reroll matches 68 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ruby/boots
execute if score #Item nl.Reroll matches 77 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ruby/amulet

# Sapphire # 
execute if score #Item nl.Reroll matches 42 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/sword
execute if score #Item nl.Reroll matches 43 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/pickaxe
execute if score #Item nl.Reroll matches 44 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/axe
execute if score #Item nl.Reroll matches 45 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/shovel
execute if score #Item nl.Reroll matches 46 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/hoe
execute if score #Item nl.Reroll matches 47 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/bow
execute if score #Item nl.Reroll matches 48 run loot replace block ~ ~ ~ container.10 loot next_level:tools/sapphire/shield
execute if score #Item nl.Reroll matches 69 run loot replace block ~ ~ ~ container.10 loot next_level:gear/sapphire/helmet
execute if score #Item nl.Reroll matches 70 run loot replace block ~ ~ ~ container.10 loot next_level:gear/sapphire/chestplate
execute if score #Item nl.Reroll matches 71 run loot replace block ~ ~ ~ container.10 loot next_level:gear/sapphire/leggings
execute if score #Item nl.Reroll matches 72 run loot replace block ~ ~ ~ container.10 loot next_level:gear/sapphire/boots
execute if score #Item nl.Reroll matches 78 run loot replace block ~ ~ ~ container.10 loot next_level:gear/sapphire/amulet

# Molten # 
execute if score #Item nl.Reroll matches 93 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/sword
execute if score #Item nl.Reroll matches 94 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/pickaxe
execute if score #Item nl.Reroll matches 95 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/axe
execute if score #Item nl.Reroll matches 96 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/shovel
execute if score #Item nl.Reroll matches 97 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/hoe
execute if score #Item nl.Reroll matches 98 run loot replace block ~ ~ ~ container.10 loot next_level:tools/molten/bow
execute if score #Item nl.Reroll matches 89 run loot replace block ~ ~ ~ container.10 loot next_level:gear/molten/helmet
execute if score #Item nl.Reroll matches 90 run loot replace block ~ ~ ~ container.10 loot next_level:gear/molten/chestplate
execute if score #Item nl.Reroll matches 91 run loot replace block ~ ~ ~ container.10 loot next_level:gear/molten/leggings
execute if score #Item nl.Reroll matches 92 run loot replace block ~ ~ ~ container.10 loot next_level:gear/molten/boots

# Cactus # 
execute if score #Item nl.Reroll matches 104 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/sword
execute if score #Item nl.Reroll matches 105 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/pickaxe
execute if score #Item nl.Reroll matches 106 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/axe
execute if score #Item nl.Reroll matches 107 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/shovel
execute if score #Item nl.Reroll matches 108 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/hoe
execute if score #Item nl.Reroll matches 109 run loot replace block ~ ~ ~ container.10 loot next_level:tools/cactus/bow
execute if score #Item nl.Reroll matches 100 run loot replace block ~ ~ ~ container.10 loot next_level:gear/cactus/helmet
execute if score #Item nl.Reroll matches 101 run loot replace block ~ ~ ~ container.10 loot next_level:gear/cactus/chestplate
execute if score #Item nl.Reroll matches 102 run loot replace block ~ ~ ~ container.10 loot next_level:gear/cactus/leggings
execute if score #Item nl.Reroll matches 103 run loot replace block ~ ~ ~ container.10 loot next_level:gear/cactus/boots

# Frozen # 
execute if score #Item nl.Reroll matches 115 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/sword
execute if score #Item nl.Reroll matches 116 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/pickaxe
execute if score #Item nl.Reroll matches 117 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/axe
execute if score #Item nl.Reroll matches 118 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/shovel
execute if score #Item nl.Reroll matches 119 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/hoe
execute if score #Item nl.Reroll matches 120 run loot replace block ~ ~ ~ container.10 loot next_level:tools/frozen/bow
execute if score #Item nl.Reroll matches 111 run loot replace block ~ ~ ~ container.10 loot next_level:gear/frozen/helmet
execute if score #Item nl.Reroll matches 112 run loot replace block ~ ~ ~ container.10 loot next_level:gear/frozen/chestplate
execute if score #Item nl.Reroll matches 113 run loot replace block ~ ~ ~ container.10 loot next_level:gear/frozen/leggings
execute if score #Item nl.Reroll matches 114 run loot replace block ~ ~ ~ container.10 loot next_level:gear/frozen/boots

# Ethereal # 
execute if score #Item nl.Reroll matches 126 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/sword
execute if score #Item nl.Reroll matches 127 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/pickaxe
execute if score #Item nl.Reroll matches 128 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/axe
execute if score #Item nl.Reroll matches 129 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/shovel
execute if score #Item nl.Reroll matches 130 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/hoe
execute if score #Item nl.Reroll matches 131 run loot replace block ~ ~ ~ container.10 loot next_level:tools/ethereal/bow
execute if score #Item nl.Reroll matches 122 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ethereal/helmet
execute if score #Item nl.Reroll matches 123 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ethereal/chestplate
execute if score #Item nl.Reroll matches 124 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ethereal/leggings
execute if score #Item nl.Reroll matches 125 run loot replace block ~ ~ ~ container.10 loot next_level:gear/ethereal/boots

execute at @s as @e[distance=..1,tag=UI_Reroll,limit=1] run data modify entity @s Item set from block ~ ~ ~ Items.[{Slot:10b}]
