execute if entity @s[tag=nitSiteEast] run place template nitk:town/windmill ~1 ~-3 ~-7

execute if entity @s[tag=nitSiteWest] run place template nitk:town/windmill ~-15 ~-3 ~-7 

execute if entity @s[tag=nitSiteNorth] run place template nitk:town/windmill ~-7 ~-3 ~-15

execute if entity @s[tag=nitSiteSouth] run place template nitk:town/windmill ~-7 ~-3 ~1

function nitk:siteplanner/new_sites_check
function nitk:siteplanner/attacks_check
advancement grant @a[distance=..20] only nitk:nitk/complete_town build-windmill

scoreboard players operation @e[tag=nitResourceChest,distance=..100] nitID = @e[tag=nitKTP,limit=1,sort=nearest] nitID
scoreboard players operation #nitID nitTemp = @e[tag=nitKTP,limit=1,sort=nearest] nitID
execute as @e[tag=nitResourceChest] if score @s nitID = #nitID nitTemp run tag @s add nitID_match
tag @e[tag=nitResourceChest,tag=nitID_match] add nitWindmillDouble
tag @e[tag=nitResourceChest,tag=nitID_match] remove nitID_match