#nethershoptext
execute as @a run execute at @s positioned ^ ^ ^1.5 run execute if entity @e[type=minecraft:armor_stand,distance=..1.5,tag=NetherShopText] run execute as @s run function zzzzdonotuse:halfsec/detectshopstand


#might need if champs exist in structures
execute as @a[gamemode=!spectator] run execute at @s run execute if entity @e[distance=..10,tag=ChampMob] run function zzzzdonotuse:halfsec/champions


#gold nuggy
execute as @a run execute at @s run execute as @e[distance=..4,type=item,nbt={Item:{Count:1b,tag:{display:{Lore:["\"Throw me on the ground for a surprise!\""]}}}}] run function zzzzdonotuse:halfsec/raredroptable


#nether corruption
execute as @a[gamemode=!spectator] run execute at @s[predicate=suhc:overworld] run execute if block ~ ~ ~ nether_portal run execute unless entity @e[distance=..10,type=marker,tag=KyuNetherCorruptionMain] run function zzzzdonotuse:nethercorruption/touchportal
execute as @a[gamemode=!spectator,scores={NetherQ=1..}] run execute at @s run execute if entity @e[type=marker,tag=KyuNetherCorruptionMain,distance=..5] run function zzzzdonotuse:nethercorruption/addscoretoportal
execute at @e[type=marker,tag=KyuNetherCorruptionMain] run execute as @a[distance=..50,limit=4,sort=random] run execute at @s run execute if biome ~ ~ ~ minecraft:nether_wastes run particle minecraft:crimson_spore ~ ~ ~ 13 9 13 .5 200 normal



#special markers
execute at @a run execute as @e[distance=..200,type=marker,tag=KyuSpecialMarkerHalfSec] run function zzzzdonotuse:halfsec/specialmarkers



#spell stuff
execute as @a[tag=K,nbt={SelectedItem:{id:"minecraft:paper",tag:{Enchantments:[{}]}}},tag=!SpellUpdate] run function zzzzdonotuse:spell/consumepagemain
scoreboard players enable @a[tag=K] KyuSpells
tag @a[tag=K,tag=SpellUpdate,tag=SpellUpdateRemove] remove SpellUpdate
tag @a[tag=K,tag=SpellUpdateRemove] remove SpellUpdateRemove

execute in overworld run data merge block 999979 159 999975 {auto:1b}



execute if entity @a[scores={KyuSpells=1..}] run execute as @a[scores={KyuSpells=1..}] run function zzzzdonotuse:spell/activatespellmain




