execute if entity @s[tag=nitSiteEast] if block ~ ~ ~2 stone_bricks run place template nitk:town/wall_corner ~1 ~-3 ~9 counterclockwise_90
execute if entity @s[tag=nitSiteEast] if block ~ ~ ~-2 stone_bricks run place template nitk:town/wall_corner ~1 ~-3 ~5 counterclockwise_90

execute if entity @s[tag=nitSiteWest] if block ~ ~ ~2 stone_bricks run place template nitk:town/wall_corner ~-1 ~-3 ~-5 clockwise_90
execute if entity @s[tag=nitSiteWest] if block ~ ~ ~-2 stone_bricks run place template nitk:town/wall_corner ~-1 ~-3 ~-9 clockwise_90

execute if entity @s[tag=nitSiteNorth] if block ~2 ~ ~ stone_bricks run place template nitk:town/wall_corner ~9 ~-3 ~-1 180
execute if entity @s[tag=nitSiteNorth] if block ~-2 ~ ~ stone_bricks run place template nitk:town/wall_corner ~5 ~-3 ~-1 180

execute if entity @s[tag=nitSiteSouth] if block ~2 ~ ~ stone_bricks run place template nitk:town/wall_corner ~-5 ~-3 ~1
execute if entity @s[tag=nitSiteSouth] if block ~-2 ~ ~ stone_bricks run place template nitk:town/wall_corner ~-9 ~-3 ~1

execute if entity @s[tag=nitSiteEast] run tag @s add nitSiteExistsWest
execute if entity @s[tag=nitSiteEast] run tag @s add nitSiteExistsSouth
execute if entity @s[tag=nitSiteWest] run tag @s add nitSiteExistsEast
execute if entity @s[tag=nitSiteWest] run tag @s add nitSiteExistsNorth
execute if entity @s[tag=nitSiteNorth] run tag @s add nitSiteExistsSouth
execute if entity @s[tag=nitSiteNorth] run tag @s add nitSiteExistsEast
execute if entity @s[tag=nitSiteSouth] run tag @s add nitSiteExistsNorth
execute if entity @s[tag=nitSiteSouth] run tag @s add nitSiteExistsWest
execute if entity @s[tag=nitSiteEast] if block ~ ~ ~2 stone_bricks positioned ~ ~ ~2 run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteEast] if block ~ ~ ~-2 stone_bricks positioned ~ ~ ~-2 run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteWest] if block ~ ~ ~2 stone_bricks positioned ~ ~ ~2 run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteWest] if block ~ ~ ~-2 stone_bricks positioned ~ ~ ~-2 run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteNorth] if block ~2 ~ ~ stone_bricks positioned ~2 ~ ~ run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteNorth] if block ~-2 ~ ~ stone_bricks positioned ~-2 ~ ~ run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteSouth] if block ~2 ~ ~ stone_bricks positioned ~2 ~ ~ run function nitk:siteplanner/new_sites_check
execute if entity @s[tag=nitSiteSouth] if block ~-2 ~ ~ stone_bricks positioned ~-2 ~ ~ run function nitk:siteplanner/new_sites_check

execute if entity @s[tag=nitSiteEast] run tag @s add nitSiteExistsEast
execute if entity @s[tag=nitSiteEast] run tag @s add nitSiteExistsNorth
execute if entity @s[tag=nitSiteWest] run tag @s add nitSiteExistsWest
execute if entity @s[tag=nitSiteWest] run tag @s add nitSiteExistsSouth
execute if entity @s[tag=nitSiteNorth] run tag @s add nitSiteExistsNorth
execute if entity @s[tag=nitSiteNorth] run tag @s add nitSiteExistsWest
execute if entity @s[tag=nitSiteSouth] run tag @s add nitSiteExistsSouth
execute if entity @s[tag=nitSiteSouth] run tag @s add nitSiteExistsEast
function nitk:siteplanner/walls/new_walls_check