Is there any command to stop npcs spawning naturaliy outside of invasions and structures?
Is there any command to stop npcs spawning naturaliy outside of invasions and structures?
/gamerule doMobSpawning false
This should give you what you're looking for I think. It only stops natural spawns and structures and invasions both have their own spawners so it sounds like it would work.