Stopping Endermen from picking up blocks.

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Lathanael

New Member
Jul 29, 2019
959
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.
You ...you... i like that idea :evilgrin:
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
I'd love a mod that would allow endermen to grab nearly any block, don't see why they should ignore those tastey mod blocks. Forces you to plan a bit more.
 

Golrith

Over-Achiever
Trusted User
Nov 11, 2012
3,834
2,137
248
Let them pick up that aqueous accumulator near your max sized railcraft boiler and watch out for the blow up... Not a good idea seriously...
Sure it is, it's survival after all. Not sure how their code works, but if it's unobstructed blocks, a duct out of the top would stop the grief, or just placing in an area they can't reach. You already defend your builds against creepers, why not more things?
Reminds me of the 1.5.x mod called Primitive Mobs. Had that on our server, and it features TNT throwing creepers. See one of those, and you need to deal with the threat. They are very very deadly. Totally destroyed our starting base, with a nice big hole in the ground. We actually miss them now, there's nothing of equal threat in 1.6.x
 
  • Like
Reactions: glepet1962

FyberOptic

New Member
Jul 29, 2019
524
0
0
Okay, here we go: Endermanage 1.0

The EnderProof name still kind of worked, but I like the play on words with this one too. It's certainly not worse than others that went through my head though, such as EnderTender, and, yes, Endler's List. That happened.

I'll make a proper download page on Minecraft Forum later, but for now I'll just paste the readme:

Code:
Endermanage allows you to control which blocks Endermen are allowed to pick up
and carry.  The config file allows three modes: pick up no blocks except the
ones specified, pick up the default blocks as well as the ones specified, or
pick up all blocks except for the ones specified.

Individual blocks and block ranges can be specified, including mod block IDs.

Please note that some blocks, especially mod blocks, could have unexpected
results from being carried.  They may simply not render, or could potentially
even crash your game!

Remember that you can set your game to peaceful to temporarily remove all
Endermen if necessary.

Still only for MC 1.6.x. Since it's simple I might build it for 1.5.x as well for folks running older packs, like I do my other mods.

Just let me know if you see any problems.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Aye, do note that an enderman picking up a chest throws an AOOB exception. This will probably hold true to any mod item with an inventory. Have to do more testing.
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
Aye, do note that an enderman picking up a chest throws an AOOB exception. This will probably hold true to any mod item with an inventory. Have to do more testing.

A vanilla chest? I tested with those, and just now did so again. The items spill out on the ground for me.

This is with no other mods installed, mind you.
 

Not_Steve

Over-Achiever
Oct 11, 2013
1,482
3,264
293
The EnderProof name still kind of worked, but I like the play on words with this one too. It's certainly not worse than others that went through my head though, such as EnderTender, and, yes, Endler's List. That happened.
Enders game?
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Hrm. I'll have to do some more testing. It's all possible an enderman spawned elsewhere picking up a loot filled chest, but disabling chests in the config stopped this. It could very well be a mod item spawning in a chest underground causing it. It wasn't happening every time I tested it.
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
EnderMender.
BETTER YET:
TheEnderPretender

I like EnderMender actually, but Endermanage is a bit more descriptive of what the mod does. Plus the cat was already out of the bag by the time I saw your post!

Enders game?

That one crossed my mind as well, but I didn't feel it was descriptive enough either. Plus I like not getting sued!

Hrm. I'll have to do some more testing. It's all possible an enderman spawned elsewhere picking up a loot filled chest, but disabling chests in the config stopped this. It could very well be a mod item spawning in a chest underground causing it. It wasn't happening every time I tested it.

Well you can toss me a crash log sometime and that might shed some light on it, but you might be right. You never know how a mod can affect behavior.
 
  • Like
Reactions: kaovalin

Celestialphoenix

Too Much Free Time
Nov 9, 2012
3,741
3,204
333
Tartarus.. I mean at work. Same thing really.
I wouldn't mind so much if the conditions for a block to be picked up was stricter
Block must have 'air' on top
Block must have 'air' on the side.
This'll prevent the swiss cheese effect- that they'll only take from the edges, and won't leave floating trees or holes in buildings.​
Though for a little extra fun- angry enderman ignore the air criteria; and will pull blocks out the way to hit the player.
(as a saving pass- enderman will always drop a held block on death, so you can rescue it)
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
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.
If you make endermen carry away my ME system..
 
  • Like
Reactions: Eyamaz

PierceSG

New Member
Jul 29, 2019
2,047
0
0
Enderman should be able to place activated tnt blocks.

Sent from my GT-N8020 using Tapatalk
 

FyberOptic

New Member
Jul 29, 2019
524
0
0
I wouldn't mind so much if the conditions for a block to be picked up was stricter
Block must have 'air' on top
Block must have 'air' on the side.
This'll prevent the swiss cheese effect- that they'll only take from the edges, and won't leave floating trees or holes in buildings.​
Though for a little extra fun- angry enderman ignore the air criteria; and will pull blocks out the way to hit the player.
(as a saving pass- enderman will always drop a held block on death, so you can rescue it)

I like the idea of always dropping the block on death. I think throwing the block at the player when mad would also be a fun behavior, especially if it hurt you. Changing the rules would be somewhat more complex though. And you have tricky issues, such as what if the Enderman were in the air when dying? Do you just leave the block hovering in the air as well? If you make them fall like sand and gravel, then you potentially need a new type of entity as well.

Currently though there really aren't much of any rules. There's a 1 in 20 chance he'll try to pick up a block if he's not already carrying one. The block position he tries to get is then randomly decided in a two-block radius around him on the X and Z, and randomly within three blocks on Y (his height). If it's one of the blocks enabled in his carriableBlocks array, then he grabs it. That's it.

For putting them back down, it's slightly different. There's a 1 in 2000 chance he'll try to do so when carrying one. It then determines a coordinate within only a one block radius on X and Z, and only within the lower two blocks of his height. If this block is empty, and the block below it is a "normal" block (not a sign, button, etc), then he puts the block down. Again, that's it.

There's floating point math and rounding here when doing the block position calculations, so the range in which the block can be picked up could in fact vary slightly depending on the exact coordinates in the world, particularly when leaning towards the positive axes. That means it's possible that an Enderman could in fact grab a block from above his head, or place one back at eye level, in some circumstances. Almost equally as rarely, the X and Z range could even be one less on the positive-leaning axes than on the negative side. Floating point really is a butt to deal with sometimes! Hence, some of the odd behavior you see in older versions when trying to reach the Far Lands.


Enderman should be able to place activated tnt blocks.

Enderman can't carry entities, which is what an activated TNT block becomes. However, using Endermanage, they would be able to pick up regular TNT blocks, and accidentally sit them down next to a redstone source!
 
Last edited:
  • Like
Reactions: PierceSG

trajing

New Member
Jul 29, 2019
3,091
-14
1
-snip-
Enderman can't carry entities, which is what an activated TNT block becomes. However, using Endermanage, they would be able to pick up regular TNT blocks, and accidentally sit them down next to a redstone source!
Or they can pick TNT blocks up, then put a redstone torch next to them!