execute as @a[tag=K] store result score @s KyuTime run time query daytime
tag @a remove STAHP
tag @a[nbt=!{SleepTimer:0s}] add STAHP
tag @a[scores={KyuTime=13685..22335}] remove STAHP
tellraw @a[tag=K,tag=STAHP] ["",{"text":"It's not completely night yet, so you cannot sleep.","color":"red"}]
execute as @a[tag=STAHP] run execute at @s run tp @s ~ ~.1 ~


#item replace entity @e[tag=GKNameTag,tag=!GKQMARK] weapon.offhand with minecraft:gold_nugget{display:{Lore:["\"Throw me on the ground for a surprise!\""]}}
execute as @a[tag=K] 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 execute as @s[tag=!GoldNuggyNoRDT] run function zzzzdonotuse:halfsec/raredroptable
execute as @a[gamemode=!spectator,tag=K] run execute at @s run execute if entity @e[type=minecraft:marker,name=BUQ,tag=!BUQ2,distance=..18] run function zzzzdonotuse:halfsec/sinkholeparticles
#execute at @a[gamemode=!spectator,tag=K] run execute if entity @e[type=minecraft:marker,name=BUQ,tag=!BUQ2,distance=..6] run function zzzzdonotuse:halfsec/sinkholeactivate
#execute at @a[tag=K] if block ~ ~ ~ nether_portal run scoreboard players set @p[distance=..1] PortalQ 1
#execute as @a[tag=K] run execute at @s run execute if block ~ ~ ~ nether_portal run function zzzzdonotuse:halfsec/portalstandactivate
#execute as @a[tag=K,scores={NetherQ=1..}] run execute at @s run execute if entity @e[type=armor_stand,tag=HellKill,name=!256,name=!11037,name=!PortalPig,limit=1,distance=..5] run function zzzzdonotuse:halfsec/portalstandscoreboard

#moved to 1tick
##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[gamemode=!spectator,tag=K,scores={NetherQ=1..}] run execute at @s run execute if entity @e[type=marker,tag=KyuNetherCorruptionMain,distance=..6] run execute as @s[nbt={Dimension:"minecraft:overworld"}] run function zzzzdonotuse:nethercorruption/addscoretoportal



##empty for now, so turn off
#execute at @a run execute as @e[distance=..200,type=marker,tag=KyuSpecialMarkerHalfSec] run function zzzzdonotuse:halfsec/specialmarkers