How to keep endermen in an arena?

How to keep endermen in an arena? - Portrait of Woman Keep Finger at Lips

I'm making an arena minigame, and I realized a problem with the endermen: they would teleport out of the arena if left alone too long. I cannot fill in the area around the arena because the lobby is right next to it, and I really don't want to disable all the command blocks summoning the endermen. If the endermen cannot be kept in the arena, can they at least, through commands, be convinced to teleport back into the arena?



Best Answer

You have several options:

1) Move the arena to a far place, then fill out the surrounding space. To get to the arena use /tp.

2) Fill all exposed ground with slabs, water, …

3) Place a repeat and alwyas active command block with this command:

/testfor @e<kbd>[type=Enderman, x=X, y=Y, z=Z, r=ArenaWidth]

Then, place another repeat, always active command block testing if the 1st command block returned a false output. I'll use XC, YC and ZC as its coordinates:

/testforblock XC YC ZC minecraft:command_block -1 {SuccessCount:0} 

Next to that command block place another one, this time chain:

/summon Enderman X Y Z

In both cases X, Y and Z above are the same coordinates.




Pictures about "How to keep endermen in an arena?"

How to keep endermen in an arena? - Background of wall full of many similar aged shabby vintage wooden drawers with metal round handles
How to keep endermen in an arena? - Stack of white carton boxes on wooden table
How to keep endermen in an arena? - Head of man lying on water with flowers



Quick Answer about "How to keep endermen in an arena?"

  • Use boats. Then they wander in the boats and get stuck. Or use water. – Bald Bantha. Apr 29, 2016 at 14:15.
  • I'm sure Mojang added a command to summon them without teleportation. – TwentyCharMax. Apr 29, 2016 at 14:23.


  • Will endermen teleport onto carpet?

    Cover the floor in double carpets - two layers of carpet. The endermen don't spawn on it, don't consider that a valid teleport destination and don't pathfind over it unless they happen to get there accidentally e.g. after dropping off ledges.

    Why do Enderman disappear?

    Endermen now have a realm of their own: the End, where they spawn frequently. Endermen used to burn in sunlight, but as of this update, they instead randomly teleport around until they find a dark spot or despawn eventually. This makes it extremely hard to get close enough to kill them during daytime.

    Can an Enderman teleport into your house?

    Can endermen teleport to my house? Yes, they can, but only if your house is higher than three blocks and the light level is lower than 7.

    What to do if an Enderman is in your house?

    An Enderman will only attack players who look at his eyes or attacked him first. So just increase the volume of your game's sound while playing, so when an enderman teleports inside, you will instantly realize this from their special sound, and then make sure you don't look at them into their eyes. That's it.



    How to Stop Enderman Teleporting




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Thành Đỗ, Monstera, Karolina Grabowska, Darya Sannikova