##Note: These are to replace certain old items with new ones that have the new mainhand/offhand tags. This can likely be removed after an update or two.
execute as @a[predicate=suhc:holdingsoullanternmainhand] run execute at @s[predicate=!suhc:onetickmainhand] run function zzzzdonotuse:fix/newitemtags/onetickmainhand
execute as @a[predicate=suhc:slowfallfeather] run execute at @s[predicate=!suhc:onetickmainhand] run function zzzzdonotuse:fix/newitemtags/onetickmainhand
execute as @a[predicate=suhc:spellbook] run execute at @s[predicate=!suhc:onetickmainhand] run function zzzzdonotuse:fix/newitemtags/onetickmainhand
execute as @a[predicate=suhc:holdingsoullantern] run execute at @s[predicate=!suhc:onetickoffhand] run function zzzzdonotuse:fix/newitemtags/onetickoffhand


scoreboard players add #DayQ DQT 2
execute if score #DayQ DQT matches 250..302 run execute as @e[distance=..10,type=armor_stand,name=DayQ] run function zzzzdonotuse:1tick/activate7sec

scoreboard players add #DayQ 10TickTimer 1
execute if score #DayQ 10TickTimer matches 5..11 run function zzzzdonotuse:1tick/activatehalfsec

execute at @a run execute as @e[type=marker,tag=KyuStructureBase,distance=..200] positioned ~ ~ ~ run function zzzzdonotuse:structures/summonstructurenew

execute as @a[tag=BookUpdate] run function zzzzdonotuse:spell/holdingbook

execute as @a[tag=K] run execute at @s run execute if entity @e[type=item,distance=..2] run execute if entity @e[distance=..2,type=item,nbt={Item:{tag:{kyuspecialitem:1b}}}] run function zzzzdonotuse:halfsec/specialitems

execute as @a[gamemode=!spectator,tag=K] run execute at @s run execute if block ~ ~ ~ nether_portal run execute unless entity @e[distance=..10,type=marker,tag=KyuNetherCorruptionMain] run execute as @s[nbt={Dimension:"minecraft:overworld"}] run function zzzzdonotuse:nethercorruption/touchportal


#execute as @a[predicate=suhc:holdingsoullantern] run function zzzzdonotuse:fix/soullanternscoreboard
#execute as @a[predicate=suhc:holdingsoullanternmainhand] run function zzzzdonotuse:fix/soullanternscoreboard

execute as @a[predicate=suhc:onetickmainhand] run function zzzzdonotuse:1tick/mainhand
execute as @a[predicate=suhc:onetickoffhand] run function zzzzdonotuse:1tick/offhand

#execute as @a[predicate=suhc:sneakonground,x_rotation=-90..-30] run execute as @s[predicate=suhc:wearingspringboots] run execute as @s[nbt={OnGround:1b}] run function zzzzdonotuse:modifyarmor/modules/springbootseffect
execute as @a[predicate=suhc:sneakonground] run function zzzzdonotuse:1tick/sneaking
