execute if entity @s[tag=nitSiteEast] run place template nitco:fortress/keep/keep ~3 ~-6 ~-7
execute if entity @s[tag=nitSiteEast] run place template nitco:fortress/keep/keep_conn_ew ~1 ~-2 ~-2

execute if entity @s[tag=nitSiteWest] run place template nitco:fortress/keep/keep ~-17 ~-6 ~-7
execute if entity @s[tag=nitSiteWest] run place template nitco:fortress/keep/keep_conn_ew ~-4 ~-2 ~-2

execute if entity @s[tag=nitSiteNorth] run place template nitco:fortress/keep/keep ~-7 ~-6 ~-17
execute if entity @s[tag=nitSiteNorth] run place template nitco:fortress/keep/keep_conn_ns ~-2 ~-2 ~-4

execute if entity @s[tag=nitSiteSouth] run place template nitco:fortress/keep/keep ~-7 ~-6 ~3
execute if entity @s[tag=nitSiteSouth] run place template nitco:fortress/keep/keep_conn_ns ~-2 ~-2 ~1

function nitco:siteplanner/keep/new_keep_check

scoreboard players add @a[distance=..20] nitKeepCraft 1
advancement grant @a[scores={nitKeepCraft=6..}] only nitco:nitco/ach5.3 build-6

execute at @e[tag=nitKeeper] as @s run summon villager ~ ~ ~ {VillagerData:{profession:mason,level:4,type:swamp},Invulnerable:1,PersistenceRequired:1,NoAI:1,CustomName:'{"text":"Nether Keeper"}',Offers:{Recipes:[{buy:{id:feather,Count:1},sell:{id:"minecraft:written_book",Count:1},maxUses:9999999},{buy:{id:nether_brick,Count:5},buyB:{id:gold_ingot,Count:1},sell:{id: "minecraft:nether_brick", Count: 2b, tag: {nitco_strongBrick:1b,HideFlags:1,display:{Name:'{"text":"Reinforced Brick","color":"red","italic":false}'},Enchantments:[{id:"minecraft:protection",lvl:0}]}},rewardExp:0b,maxUses:9999999}]},Tags:[nitEntity,nitDenizen,nitCK,smithed.entity,smithed.strict]}
function nitk:debug/update_all
kill @e[tag=nitWarStrategist]