forceload add 999996 999980
scoreboard objectives add TPKyu dummy

execute unless block 999999 119 999983 structure_block run setblock 999999 119 999983 minecraft:structure_block[mode=load]{name:"suhc:kyuandqstructurescommandblocks",posX:-15,posZ:-15,posY:0,rotation:NONE,mirror:NONE,mode:LOAD,ignoreEntities:0b} destroy
execute unless block 999999 120 999983 diamond_block run setblock 999999 120 999983 redstone_block


#tag @s add CheckStructures
#execute store result score @s StructureLoadCheck run locate structure suhc:stalagmitebase
#execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
#execute store result score @s StructureLoadCheck run locate structure suhc:skeletonoutpostbase
#execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
#execute store result score @s StructureLoadCheck run locate structure suhc:enchantedcavernbase
#execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
#
##execute as @e[type=armor_stand,name=DayQ,tag=CheckStructures] run tellraw @a[tag=K] ["",{"text":"Structures do not appear to be loading properly. Please restart the server, and submit a bug report if this message appears again afterwards.","color":"yellow","italic":"false"}]
#
#execute as @s[tag=CheckStructures] run tellraw @a ["",{"text":"Kyu&Q Structures has been installed! You will need to restart your world/server in order to make structures start spawning.","color":"gold"}]
tellraw @a ["",{"text":"- If you wish to check datapack settings, run '/function kyuandqstructures:config'.","color":"gold"}]



execute in minecraft:overworld run data merge block 999985 120 999982 {auto:1b}

gamerule universalAnger true
gamerule doFireTick false