#execute unless block ~ 127 ~ bedrock run spreadplayers ~ ~ 30 125 false @s


#KCP = Kyu Chunk Position, used for the chunk borders


execute store result score @s KCPX1 run data get entity @s Pos[0] 1
execute store result score @s KCPZ1 run data get entity @s Pos[2] 1
scoreboard players operation @s KCPX2 = @s KCPX1
scoreboard players operation @s KCPZ2 = @s KCPZ1
scoreboard players operation @s KCPX1 %= @s ChunkCheckKyu
scoreboard players operation @s KCPZ1 %= @s ChunkCheckKyu
scoreboard players operation @s KCPX2 -= @s KCPX1
scoreboard players operation @s KCPZ2 -= @s KCPZ1
execute store result entity @s Pos[0] double 1 run scoreboard players get @s KCPX2
execute store result entity @s Pos[2] double 1 run scoreboard players get @s KCPZ2

execute at @s positioned ~-32 1 ~-32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-32 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-32 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-32 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-32 1 ~32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance

execute at @s positioned ~-16 1 ~-32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-16 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-16 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-16 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~-16 1 ~32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance

execute at @s positioned ~ 1 ~-32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~ 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~ 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~ 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~ 1 ~32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance

execute at @s positioned ~32 1 ~-32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~32 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~32 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~32 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~32 1 ~32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance

execute at @s positioned ~16 1 ~-32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~16 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~16 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~16 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
execute at @s positioned ~16 1 ~32 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance




#execute positioned ~16 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~-16 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~ 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~ 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~16 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~16 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~-16 1 ~16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~-16 1 ~-16 run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance
#execute positioned ~ 1 ~ run execute unless block ~ ~ ~ barrier run function zzzzdonotuse:structures/dostructurechance



#execute at @s positioned ~ 0 ~ run execute unless block ~ ~ ~ diamond_block run execute if predicate suhc:25percent run execute if predicate suhc:25percent run execute if predicate suhc:25percent run setblock ~ 120 ~ gold_block
#execute at @s positioned ~ 0 ~ run setblock ~ ~ ~ diamond_block