My first post...and my first mod (though it is extremely basic).
Keep Those Mobs Out of My House!
This will ensure that hostile mobs spawn only on natural materials by whitelisting what they are able to spawn on. This mod only allows them to spawn on
[*:uonou7nn]Grass[*:uonou7nn]Smooth stone[*:uonou7nn]Dirt[*:uonou7nn]Sand[*:uonou7nn]Gravel[*:uonou7nn]Clay[*:uonou7nn]Snow (not snow blocks, as in the blocks made from snowballs)[*:uonou7nn]Ice[*:uonou7nn]Bedrock[*:uonou7nn]Mossy cobblestone[*:uonou7nn]Netherrack[*:uonou7nn]Glow stone[*:uonou7nn]Soul sand[*:uonou7nn]Monster spawners
Anything else in your base will have to be adequately lit, as usual.
Now, you may be wondering why this is labeled "Sort of WIP." That's mostly because I have not extensively tested it. I've done several quick tests in which mobs spawned on grass and not on cobblestone, and from that it seems as though everything else should be in order, but I'd still like to hear from you guys to see if there's anything wrong (which knowing me there likely is). The other reason, however, is because I'd like to see if you have any suggestions for this mod. It is very simple, so I'm not sure what you could really add to it, and I am far from experienced with Minecraft coding, so what you suggest I might not be able to add, but I guess we'll see!
[*:uonou7nn]Locate minecraft.jar in "%APPDATA%/.minecraft/bin" and create a backup.[*:uonou7nn]Open it with an archive editor such as 7-Zip.[*:uonou7nn]Delete the META-INF folder, if you haven't already[*:uonou7nn]Copy fi.class into minecraft.jar, overwriting the file that's already there.[*:uonou7nn]Test out Minecraft and report bugs here.
Epic, but I like making my stuff feel snowy, so what If i place edited snow on my wooden house? Will spiders be jumping down on me when I leave?
If you're using naturally generated snow (i.e. the thin layer that generates in snowy biomes) then yes, you could still be ambushed (I'm not entirely sure, though, to be honest. I haven't tested it.). If you're using snow blocks (the kind you craft from snowballs) then you're safe.
Hey, Kipernal, looks like you made a mod! Pretty cool!
Just as a suggestion, you might want to make the list easily editable. For example, make a text file called mobs.txt, and put the block IDs in it (one per line). Then, read them into memory. It wouldn't actually be too hard, and it'd make this mod more practical.