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.
I can attest for mo creatures yes it does work
It does not work for Humans+
It does not work for the dragon mob mod seen here viewtopic.php?f=1032&t=224380
I do not have RPG mobs
EDIT: i believe the reason for this is because in the code it only blocks mob spawning, where humans may not be under the class mob, but under entity instead. Same with dragons
I can attest for mo creatures yes it does work
It does not work for Humans+
It does not work for the dragon mob mod seen here viewtopic.php?f=1032&t=224380
I do not have RPG mobs
EDIT: i believe the reason for this is because in the code it only blocks mob spawning, where humans may not be under the class mob, but under entity instead. Same with dragons
Darn was hoping to stop from being ambushed when I walked around the corner. It always seems like a rogue or a shadow walker always show up at the worst possible times and pounce.
Darn was hoping to stop from being ambushed when I walked around the corner. It always seems like a rogue or a shadow walker always show up at the worst possible times and pounce.
yeah i ended up uninstalling humans+ until the ability to change strengths and other forms of customization is added
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.
The source, for anyone curious:
This replaces line ~104 in EntityMobs.java. Yes, I could have put it all on one line, but for the sake of readability I didn't.
Now I can get tell the mobs to "GET OFF MY LAWN!"
Lol! (Credit ViscousPrudoctions.
so heres a diamond
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.
Okay then.
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.
"I only regret that I have but one life to give for my country."
~Nathan Hale
- Mo Creatures
- Humans+
- RPG Mobs
I can attest for mo creatures yes it does work
It does not work for Humans+
It does not work for the dragon mob mod seen here viewtopic.php?f=1032&t=224380
I do not have RPG mobs
EDIT: i believe the reason for this is because in the code it only blocks mob spawning, where humans may not be under the class mob, but under entity instead. Same with dragons
Darn was hoping to stop from being ambushed when I walked around the corner. It always seems like a rogue or a shadow walker always show up at the worst possible times and pounce.
yeah i ended up uninstalling humans+ until the ability to change strengths and other forms of customization is added
EDIT: nevermind zombe did it already viewtopic.php?f=25&t=96815