In vanilla minecraft mobs don't spawn if the light level of the block is 9 or above. However, I often don't want to fully lit all my structures. I might want a courtyard or a cellar that isn't fully lit. Also controllable light systems with redstone are a lot of fun to make, but I can never turn the lights off in fear of spawning mobs.
Is there a mod or another solution to have both unlit places and no mobs around? Maybe some kind of block that prevents mobs from spawning within a radius.