The Hordes addon for MineColonies
This addon solves the problem of mobs from 'The Hordes' mod spawning inside MineColonies colony territories.
How the system works:
When 'The Hordes' mod determines a mob spawn point at a distance of 75 blocks from the player, this addon checks if the selected position is within any colony. If it is, the system automatically increases the distance to the spawn point by 16 blocks from the player and repeats the check. This process continues until a safe position outside the colony is found.