Stopping Endermen from picking up blocks.

Discussion in 'Mod Discussion' started by unknown zombie, Feb 13, 2014.

  1. unknown zombie

    unknown zombie Well-Known Member

    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.
  2. Racemol

    Racemol New Member

    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).
    unknown zombie likes this.
  3. unknown zombie

    unknown zombie Well-Known Member

    Thanks for the reminder about that command. I'd like to find a mod, though, because I'm okay with creeper explosions destroying blocks.
  4. SatanicSanta

    SatanicSanta New Member

    You could always just light up the area really well so they don't spawn.
  5. Lathanael

    Lathanael New Member

    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 :)
  6. MigukNamja

    MigukNamja New Member

    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.
    RedBoss likes this.
  7. John.E

    John.E Well-Known Member

    Endermen can move these blocks.
    Museli and MigukNamja like this.
  8. MigukNamja

    MigukNamja New Member

    Now *that* is an excellent Wiki page !
  9. John.E

    John.E Well-Known Member

    Too bad it's only Vanilla Minecraft!
  10. FyberOptic

    FyberOptic New Member

    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: Feb 13, 2014
  11. Algester

    Algester New Member

    Else ask chickenbones... He made an option in chickencore to make environmental friendly creepers
  12. FyberOptic

    FyberOptic New Member

    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.


    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: Feb 14, 2014
  13. Dodge34

    Dodge34 New Member

    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...
  14. unknown zombie

    unknown zombie Well-Known Member

    Awesome! Thank you very much!

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

    FyberOptic New Member

    No problem. And yeah, it just sets'em all to false on startup. I figured it was kind of silly to point out how easy it would be to do and not actually do it!
    kaovalin, Museli and unknown zombie like this.
  16. Eyamaz

    Eyamaz New Member

    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.
    kaovalin, Museli and Lathanael like this.
  17. FyberOptic

    FyberOptic New Member

    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.
    Eyamaz likes this.
  18. Eyamaz

    Eyamaz New Member

    You're awesome!

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

    Tristam Izumi New Member

    Once you get your configs requests in there, it ought to be called EnderTroll. You trolly troll.
    Eyamaz likes this.
  20. Eyamaz

    Eyamaz New Member

    I am a trolly troll. @ZeekDaGeek should have a past broadcast from playing some Hardcore BnB on his twitch. Hopefully, I'll have the pack out of dev and into open beta soon.
    Tristam Izumi likes this.

Share This Page