1

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?

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

The rm parameter allows you to obtains targets outside an area. You can use this to teleport endermen that left back to a certain location.

The following teleports endermen that are 50 blocks away or further from the specified coordinates back to the specified coordinates.

/tp @e[type=Enderman,x=10,y=64,z=10,rm=50] 10 64 10
| improve this answer | |
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.