Spawn-Proofed Villagers
This mod provides protection for village inhabitants against hostile mob spawns in their immediate vicinity. Now ordinary villagers will have the same protection from monster spawning as players.
The safe zone radius around each villager can be configured through game rules, allowing you to adapt the protection level to the specific needs of your world.
It's important to note that the spawning of iron golems and cats is not blocked by this mod, as these creatures originally do not react to the presence of players and continue to spawn naturally for village protection.