fill 999 -39 999 1001 -40 1001 air
#Structureblocks
$setblock 999 -40 999 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-1",posX:-47,posY:0,posZ:-47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1000 -40 999 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-2",posX:0,posY:0,posZ:-47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1001 -40 999 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-3",posX:47,posY:0,posZ:-47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 999 -40 1000 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-4",posX:-47,posY:0,posZ:0,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1000 -40 1000 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-5",posX:0,posY:0,posZ:0,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1001 -40 1000 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-6",posX:47,posY:0,posZ:0,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 999 -40 1001 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-7",posX:-47,posY:0,posZ:47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1000 -40 1001 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-8",posX:0,posY:0,posZ:47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
$setblock 1001 -40 1001 minecraft:structure_block[mode=load]{name:"subchronos:map$(mapID)-9",posX:47,posY:0,posZ:47,sizeX:48,sizeY:48,sizeZ:48,mode:"LOAD",ignoreEntities:0b,showboundingbox:0b}
#Kill all entities in the map area before loading the structures
execute positioned 1022 -11 1024 run kill @e[type=!minecraft:player,distance=..250]

#Redstone blocks
function subchronos:game/starting/redstone_blocks/9

#Load chests, etc...
schedule function subchronos:game/starting/mini_structures 10t

#Spread players
schedule function subchronos:game/starting/cages/spread_players/ini 11t


fill 1001 40 1001 999 40 999 air