Is there an edit to the game files that I can do to stop bats from spawning in minecraft? I would guess that I can change something in the minecraft.jar file but I am not really sure how and what to do.
So in your case:
There's no need for that to execute on every tick, but it's up to you to figure out how to make sure the command block remains chunk loaded (placing it at the world's spawn point should probably do it).
However, you can't craft command blocks, so you have to be in creative mode both to obtain and remove one, as well as make changes to their programming. They can be placed in survival, but any productive use has to be arranged through creative mode.
Without using a command block, or a mod designed to control how / when / where mobs spawn, there's no practical or effective way to accomplish it. Bats are tricky in particular because they can spawn in any single vacant block where the light level is sufficiently low. Zombies and Skeletons need at least a two-block high area in order to spawn.
You could write your own mod to prevent them from spawning, I don't think it would be entirely difficult. I'd recommend going with what's available in Forge since it's very well-maintained and supported, plus its wide-use lets lots of others enjoy your mod if you wish to share it. It'd probably be a great exercise in larning how things work, sort of like a 'hello world' mod.
There's no way to ban certain mobs without banning all of them UNLESS you use a mod. I googled around a bit and found this one, but I've never used it so I can't say whether or not it works.
If you're not interested in using mods, bats only spawn in darkness, so you could try lighting up everything.
protected by Community♦ Jun 7 at 20:06
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?