Peaceful Nights, Dangerous Caves makes hostile mobs spawn only underground, where they belong!
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.
Copyright (c) 2015, Keenan Scott
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
The Meaning of Life, the Universe, and Everything.
Location:
Friendship, NY
Join Date:
12/26/2010
Posts:
639
Minecraft:
LunariusH
Member Details
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?
Rollback Post to RevisionRollBack
"Compatability is King, but configuratiblity is Queen" - InfinityRaider
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.
It really works good, no monsters at night. But when I tested the world generation with this and some other mods, I saw a zombie at day under a spruce tree.. I have no idea how he got there
Most likely the zombie spawned somewhere properly dark, walked around at night, and when the sun rose hid under the tree to avoid burning (they're smart like that now).
If you have NEI, turn on its mob-spawning overlay (default F7) and fly around the area a bit. You'll probably find a red X somewhere nearby.
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.
The Meaning of Life, the Universe, and Everything.
Join Date:
6/1/2014
Posts:
49
Member Details
Definitely going to give this a try...
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).
Love this concept! Excellent work!
Could you make a command to temporarily enable/disable this feature in game?
btw, can it prevent zombie siege which ignores light levels?
one suggestion i would make is to have config options where we can change the weight of mob spawns at night rather than just turning them off all together as the only option.
Awesome mod, I wish more people would pay attention to this topic, it's really great because it works with other mob adding mods and other spawn-changing mods like Mo Creatures and Mob Spawn control. I don't know how it's done but it seems to override the Mob Spawn Controls nicely to prevent the hostile "night time" mobs from spawning above ground.
It's compatible with the major mods I use especially mob adding ones like:
Grimoir of Gaia
Mo Creatures
and Thaumcraft ( the knights don't get overridden so no worries )
Overall, excellent job and if you could spare the time to add this mod to Curse Forge so your playerbase can favorite them and so your mod can get better recognition, that would be awesome.
Peaceful Nights, Dangerous Caves makes hostile mobs spawn only underground, where they belong!
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.
How do I get it?
The source is available right here on GitHub: https://github.com/eggdropsoap/minecraft-pndc (see license section below)
Will there be bugs?
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?
Go for it!
How is it licensed?
PNDC is licensed under the FreeBSD license, as follows:
Edit: And no more hide holes. No more "How to survive your first night" by paulsoarejr. just kidding... to you
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!)
When you post a mod: "No pics no clicks" and "MCreator = bad ~99% of the time"
Don't forget to read the crashlog before reporting the crash. It might tell you why it's crashing.
Sorry if my spelling is bad, I'm learning english...
My mod ideas: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/mods-discussion/2354659-medsal15s-mod-ideas-hub
Why do evil poeple always want to control the world?
If you need ideas, I may be able to give you some...
Warning status: Unbanned
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.
Edit: OP updated to say that!
Thank you! I'm quite a fan of it myself.
Most likely the zombie spawned somewhere properly dark, walked around at night, and when the sun rose hid under the tree to avoid burning (they're smart like that now).
If you have NEI, turn on its mob-spawning overlay (default F7) and fly around the area a bit. You'll probably find a red X somewhere nearby.
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.
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.)
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).
Also, thank you for the quick reply.
Could you make a command to temporarily enable/disable this feature in game?
btw, can it prevent zombie siege which ignores light levels?
EDIT: Ok, now I can see that it is working. Reports error if I try to join the server without the mod installed client-side.
Just a thought...is it possible to make this mod work so that if it's installed on a server, the client wouldn't need it?
Is this compatible with JAS?
Awesome mod, I wish more people would pay attention to this topic, it's really great because it works with other mob adding mods and other spawn-changing mods like Mo Creatures and Mob Spawn control. I don't know how it's done but it seems to override the Mob Spawn Controls nicely to prevent the hostile "night time" mobs from spawning above ground.
It's compatible with the major mods I use especially mob adding ones like:
Grimoir of Gaia
Mo Creatures
and Thaumcraft ( the knights don't get overridden so no worries )
Overall, excellent job and if you could spare the time to add this mod to Curse Forge so your playerbase can favorite them and so your mod can get better recognition, that would be awesome.
[center][url=