###Runs functions for town, fortress, and city structures structures###
execute if entity @s[tag=nitGuardTower] as @e[distance=..100] run function nitk:recurs/guardtower_lookout
execute if entity @s[tag=nitJukebox] run function nitk:recurs/bard_jukebox
execute if entity @s[tag=nitCathedralWater] run function nitk:recurs/cathedral_water
execute if entity @s[tag=nitVisitor] run function nitk:recurs/town_square/visitor_info
execute if entity @s[tag=nitGhastBalloon] as @e[type=ghast,distance=..100] at @s run function nitco:recurs/ghast_balloon
execute if entity @s[tag=nitSoulForge] run function nitco:recurs/soulforge
execute if entity @s[tag=nitHealWater] run function nitco:recurs/healing_water
execute if entity @s[tag=nitPurehearth] run function nitco:recurs/purehearth
execute if entity @s[tag=nitObPylon] as @e[distance=..100] run function nitco:recurs/ob_pylon
execute if entity @s[tag=nitInfLava] run function nitref:recurs/infinite_lava
execute if entity @s[tag=nitSlowFall] run function nitref:recurs/slowfall
execute if entity @s[tag=nitDragonologist] run function nitref:recurs/dragonology/dragonologist
execute if entity @s[tag=nitDragonEgg,tag=nitUnlocked] run function nitref:recurs/dragonology/egg
execute if entity @s[tag=nitDragonHead,tag=nitUnlocked] run function nitref:recurs/dragonology/head
execute if entity @s[tag=nitDragonArmor,tag=nitUnlocked] run function nitref:recurs/dragonology/armor

###Runs the special functions for some natural structures###
execute if entity @s[tag=nitHaroldCage] run function nitk:special/cage_cured
execute if entity @s[tag=nitTyrantGhast,tag=!nitTyrantObjective,y=150,dy=50] run data modify entity @s Motion[1] set value -2.2
execute if entity @s[tag=nitAncientBuilder] run function nitco:special/withermaw_hold

###Performs checks for the invasion progress, then runs appropriate functions###
execute if entity @s[tag=nitRWither] run function nitref:invasion/control