Minecraft 1.4 and later includes the ability to use game rules which makes this mod largely obsolete for my purposes, even if updated. While it won't prevent endermen from teleporting into your base,
/gamerule mobGriefing true will prevent endermen from wrecking it once there.
One of the most annoying "features" of Minecraft are Endermen's reaction to weather effects: if they get caught out in the rain, they take damage (great!) and randomly teleport within a 32 block radius of their location (boo!). This causes situations where Endermen will randomly appear in your normally ultra-secure lair and steal your stuff.
This mod disables this behavior, and comes in two flavors:
- EnderRain Standard: Endermen no longer teleport randomly when in the rain, but still take damage. Adds a nice random "I win" element to a bad encounter with Endermen.
- EnderRain Invulnerable: Endermen no longer teleport randomly when in the rain and no longer take damage in the rain. For those who want to keep Endermen balanced roughly the way they are.
In either case, Endermen's behavior when hitting a body of water remains the same (they take damage and randomly teleport).
To use this mod, download the appropriate class file and patch your
minecraft.jar file like you would any other mod. You can find instructions readily available all over the web, but if you're on a Mac, you'd do something like:
- Download the version of EnderRain you want and unzip the downloaded file: you should have a file called
- Open Finder and in the Go menu, select Go to Folder….
- In the dialog that appears, type
~/Library/Application Support/minecraft/binand press the Go button.
- Rename the
minecraft.zip. Finder will ask you if you are sure you want to change the extension. Press the Use .zip button.
- Open (e.g., double-click) the
minecraft.zipfile to extract its contents into a folder called
- Drag the
jg.classfile from step 1 into the
minecraftfolder and let Finder overwrite the existing file.
- Rename the
minecraft.jar. Finder will ask you if you are sure you want to add the extension: press the Add button.
- Launch Minecraft!
- Developed for single-player Minecraft 1.2.5. Will not work in any other version.
- Modifies the EntityEnderman class (
jg.classfile): not compatible with any other mod that modifies that class. Unless you're using a mod that also directly modifies Endermen behavior, you should be fine (but no promises!).
This was a simple hack: assuming you deobfuscated the Minecraft source with MCP 6.2, the relevant sections are the conditions on lines 138 and 197 in
EntityEnderman.java. On line 138,
EntityEnderman::onLivingUpdate() checks to see if the Enderman is wet: if it is, the Enderman takes drowning damage. And on line 197, there's an identical conditional: if true, the Enderman deselects its target and teleports randomly. Changing one or both conditionals from
isInWater() will have the Enderman entity only check to see if it's in water and ignore whether it's in rain.
Not affiliated with or endorsed by Mojang, the creators of Minecraft. Since this is a modification of their protected work, I cannot and do not claim any copyright to it. I do, however, affirm it qualifies as Fair Use under 17 U.S.C. § 107.
Comments and feedback are welcome and appreciated. Need help on your next project? Let's talk.