Enjoy stargazing, late-night construction sessions, and moon-lit walks on the beach. Rediscover the great outdoors with an overnight camping trip. Clean up the litter of torches in your yard. Light your house with natural light during the day and let comforting darkness descend at night.

But keep your mines and basements lit, and beware of dark cave mouths when walking at night. Monsters still spawn in dark tunnels and sneak out of cracks in the earth to terrorize unwary surface-dwellers.

How does it work?

An extra check is added to the spawning rules in the Overworld that makes any block that can see the night sky directly, or is near an opening to the night sky, a safe non-spawning location. The effect is that if it's a safe block during the day in the sunlight, it will be a safe block during the night too. If you use NEI's mob-spawn overlay, this means only blocks marked with a red X are still legal spawning locations.

An exception is made for slime spawning, so that they can still spawn in swamps at night. Nether and End spawning is unchanged.

Will this interfere with my mob spawner?

So long as your mob spawner works during the day, it will keep working at night. In fact, it may become more efficient at night since the nighttime surface won't be a legal spawning location anymore.

Oh, probably! Version 0.1 is the very first release, and bugs are to be expected in a brand-new mod. Please report any bugs you encounter here, and I'll get them fixed as soon as I can.

Why did you make this?

Because I wanted to go for a long journey and camp under the stars beside my firepit in Terrafirmacraft, to properly enjoy the slow pace of Minecraft "life" in that mod, but still be truly terrified of the monsters that lurk underground (and in my poorly-lit malachite mine). Peaceful mode makes nights more, well, peaceful, but takes all the challenge out of exploring underground.

Also, it's always bothered me that monsters just "pop" into existence at night. I've always felt like if they're creeping around at night, they should come from somewhere, not just coalesce out of the darkness before my eyes. With this mod, now monsters never pop into existence where I can see them — they're always coming from somewhere deeper in the tunnels ahead of my torches, or sneaking out of a dark hole to ambush me while I putter around my night garden.

Can I include it in a modpack?

Since this is the first release and there might still be show-stopping bugs, I prefer to be asked before its included in a public modpack. But if you ask, I'll probably say yes! (You don't need permission to use it in a private modpack, of course.)

I plan to give free permission to use it in modpacks once I'm confident that there aren't any major bugs, like Enderdragons failing to spawn or something ridiculous like that.

How is it licensed?

License to be announced, as soon as I get my act together and put the source up on Github, but it will be some variety of open-source license. Poke me if you're impatient and I haven't updated this section with license and links yet.

This mod is really intriguing. Since a block has to be open to the night sky, does that mean that mobs can still spawn under trees and in shallow caves and the like?

Near an opening to the night sky is enough: it tests a block's sky-light value to find out how far away from the open sky it is, and if it's close (daylight equivalent of light 8+) it marks that spawn location as invalid. I originally tried it with just a direct view of the sky, but it made even sparsely-treed savannas more dangerously monster-ful than I was intending. (This might actually be something I'll make selectable in a future config file, for those who want normal forests and other places with small overhangs to be a no-go zone at night.)

Shallow caves and under normal trees should not see any spawns. Deeper overhangs, very large trees (such as TFC's sequoias), or large connected leaf-block canopies (such as parts of Dark Oak forests) will give enough distance from a direct view of the sky to allow limited hostile spawns at night. (These locations would already be legal spawns during the day without this mod, actually!)

What about modpacks? This mod seems like a very interesting game mechanic for one!I would really like to implement it if I make one.

I'm happy enough to give permission for using it in modpacks if someone asks! I just don't want to give free permission in the OP until I'm sure it's not hiding horrible bugs. When I'm confident that it's relatively free of any nasty bugs, I'll add blanket permission for modpacks in the OP.

I just don't want it appearing in a bunch of modpacks only to find out that it's hiding some kind of horrible lag bugs, or stops the Enderdragon from spawning sometimes, or something stupid like that.

I'm happy enough to give permission for using it in modpacks if someone asks! I just don't want to give free permission in the OP until I'm sure it's not hiding horrible bugs. When I'm confident that it's relatively free of any nasty bugs, I'll add blanket permission for modpacks in the OP.

I just don't want it appearing in a bunch of modpacks only to find out that it's hiding some kind of horrible lag bugs, or stops the Enderdragon from spawning sometimes, or something stupid like that.

Okay, thanks!

If you add more pictures and videos, I'm sure more people would try it. I will download it myself now

Does this mod work in conjunction with Zombie Awareness and Mob Spawn Controls 2? Not sure if they would all conflict.

And are custom mobs from other modpacks also supported?

I can't say for sure as I haven't tested it with those to find out, but it should just layer on top of what they do and not interfere. Judging by the description of Zombie Awareness it doesn't touch spawning rules, only mob behaviour, so there should be no conflict. (But of course, there will be fewer mobs above ground to hear the player with Zombie Awareness.) Mob Controls looks like it changes how often and in what biomes mobs can spawn, but PNDC's spawn-check happens in a different part of the code after those, so they should work together fine with Mob Controls changing what tries to spawn and where, and then PNDC disallowing the spawn attempt if there's too much "night light" at the spawn block.

Custom mobs should mostly be supported, so long as they're not doing anything weird in their code. PNDC checks if a mob is hostile by checking if it's based on the IMob class, which any mod's custom hostile mob should be based on to ensure compatibility with other mods.

I'll be compiling a list of confirmed incompatibilities that get reported. Hopefully the list will be zero, but let me know if there are any.

However, I would like to know if there are plans for future config options...such as disabling spawn restrictions on certain mobs. If I were to, for example, install a mod which adds bears to the game (which are assumed to be hostile) would they not be allowed to spawn in the forest? A simple GUI for selecting which mobs are affected would be nice.

However, I would like to know if there are plans for future config options...such as disabling spawn restrictions on certain mobs. If I were to, for example, install a mod which adds bears to the game (which are assumed to be hostile) would they not be allowed to spawn in the forest?

Also, does this apply to only the overworld?

I am planning a config file. I hadn't thought of adding a whitelist for creatures, but I can see that being useful. I'm already hardcoding the "whitelisting" of slimes, and generalising that would be nicely flexible...

Yes, this applies only to the overworld. It wouldn't make sense for the End or Nether since those are supposed to be unrelentingly hostile in the same way caves still are in Peaceful Nights, Dangerous Caves, so I made sure Nether and End spawns were untouched. (So are spawner-blocks in dungeons.) What I am still pondering is how to handle custom dimensions like Mystcraft dimensions, which are currently left alone too even if they look like an "overworld" type of dimension. I don't know of an easy way to auto-detect "overworld-like" custom dimensions, so a config option might be a reasonable stop-gap solution. (And, if I did that, you could add the Nether and the End to the list of dimensions PNDC applies to, if you wanted to.)

I am planning a config file. I hadn't thought of adding a whitelist for creatures, but I can see that being useful. I'm already hardcoding the "whitelisting" of slimes, and generalising that would be nicely flexible...

Okay, cool. Really nice mod, and I'm looking forward to a mob whitelist. Also nice to know that it only affects the overworld (I have to admit that custom dimension handling would be nice).