Stopping Endermen from picking up blocks.

unknown zombie

Well-Known Member
Jan 31, 2013
213
219
68
Florida
Does anyone know of a Forge compatible mod that will stop Endermen from picking up blocks? I'm tired of the grass around my base starting to look like swiss cheese.
 

Racemol

New Member
Jul 29, 2019
232
0
0
In Minecraft you can disable mob griefing with a command, though that would also stop creepers from destroying blocks when they explode.

Anyway, the command is /gamerule mobGriefing false
(In case of SP, cheats need to be enabled and in case of MP you need to be OP).
 
  • Like
Reactions: unknown zombie

unknown zombie

Well-Known Member
Jan 31, 2013
213
219
68
Florida
Thanks for the reminder about that command. I'd like to find a mod, though, because I'm okay with creeper explosions destroying blocks.
 

Lathanael

New Member
Jul 29, 2019
959
0
0
Have a look here (although i wouldn't use it as the mod edits base classes). Will see if i can find a Forge one :)
 

MigukNamja

New Member
Jul 29, 2019
2,202
0
0
You could always just light up the area really well so they don't spawn.

In a 1.4.7 world a while back, I swear I had an Enderman swipe a BC pipe. Lately, I've found dirt/grass blocks missing in very well-lit areas of my base and deposited in even stranger places. They flit about and play with blocks as they see fit, it seems, though they do seem to have a thing for dirt/grass blocks in particular.
 
  • Like
Reactions: RedBoss

FyberOptic

New Member
Jul 29, 2019
524
0
0
I did a bit of poking around (in 1.6). On the bright side, a mod can easily change blocks an Enderman can interact with because carriableBlocks is public static array in the EntityEnderman class. This means a mod would only need to cycle through the array and set all the array entries to false, which should do the trick. No core mod necessary, even. You could even add a config to allow the person to specify the exact blocks allowed to be picked up.

The downside is that you can't enable any block to be carried with an ID higher than 255, because that's the size of the carriableBlocks array. That pretty much knocks out the possibility of mod blocks being able to be carried without a core mod changing the array declaration.

For fun I disabled the random timer the game uses to decide when to pick up a block, then disabled the block ID check so that they would carry any kind of block. It's interesting to see them pick up pistons, levers, even furnaces (which surprised me by spilling out their contents). Several of these just won't render in their hands, though, like levers.

Of course to be mean I also sat down still water blocks, which they carried around just the same. I hoped they would flow when they sat them back down, but nope. My plan was foiled!
 
Last edited:

Algester

New Member
Jul 29, 2019
378
0
0
Else ask chickenbones... He made an option in chickencore to make environmental friendly creepers
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
I don't have time at the moment to add useful configuration features, but I whipped up a barebones version which should do what you need.

EnderProof

This is for Minecraft 1.6.x, mind you.

Also I as wrong, FML/Forge must be patching the array size at startup to match the number of block IDs, because it ends up being 4096 in size. So Endermen could indeed pick up mod blocks if the appropriate value in the array were set to true.
 
Last edited:

Dodge34

New Member
Jul 29, 2019
511
0
1
43
Somewhere over the rainbow.
The best trick to avoid them messing out with your base, build it either on a island surrounded by water, or underwater, they hate water so they avoid any place with a lot of it, also a trick is to make sure all your base is max 2 height everywhere, you can trick it by using slabs...
 

unknown zombie

Well-Known Member
Jan 31, 2013
213
219
68
Florida
I don't have time at the moment to add useful configuration features, but I whipped up a barebones version which should do what you need.

EnderProof

This is for Minecraft 1.6.x, mind you.

Also I as wrong, FML/Forge must be patching the array size at startup to match the number of block IDs, because it ends up being 4096 in size. So Endermen could indeed pick up mod blocks if the appropriate value in the array were set to true.
Awesome! Thank you very much!

This simply removes all entries from carriableBlocks? That is all I need!
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Hrm. Can you add a config whitelist to this that allows you to add mod blocks for endermen to grab? I would love to use this in BnB to allow endermen to pick up and carry away pretty much everything decorative (and lights...) Cause I'm trolly like that.
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
Hrm. Can you add a config whitelist to this that allows you to add mod blocks for endermen to grab? I would love to use this in BnB to allow endermen to pick up and carry away pretty much everything decorative (and lights...) Cause I'm trolly like that.

Yeah should be easy enough to add. I'm sure the snow will still have consumed the Earth so I should get a chance to add it tomorrow.
 
  • Like
Reactions: Eyamaz

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Yeah should be easy enough to add. I'm sure the snow will still have consumed the Earth so I should get a chance to add it tomorrow.

You're awesome!

Edit: idk if EnderProof would still be an appropriate name adding that feature though :p