3

I've created a big circuit in my vanilla server to teleport all players to an arena each 3 days.

It's all working like a charm, but a few days ago a player wasn't teleported. Chatting with him, he told me that he was on a horse.

Players on horses are not teleported?

3
  • you'd need to teleport the entity he is mounted on as well Dec 30, 2013 at 18:43
  • and how can I do it with command blocks? Dec 31, 2013 at 16:47
  • In the new 1.8 snapshots, you can use @e to teleport entities. So you can do /tp @e (coords) if you don't have other mobs enabled, or two separate blocks (one for the players, one with /tp @e[type=Horse] (coords)) Feb 12, 2014 at 2:33

1 Answer 1

3

Doing some quick testing, I've found that you can teleport players that are riding something (horse, minecart, boat, or pig), although that may be due to the fact I'm using the latest snapshot. However, whatever those players are riding will not be teleported. That means that the poor owner of the horse will be back in town while his horse is left to wander the wilderness alone. A horse owner might not be too pleased at that. The solution is to first teleport players riding horses into a secure corral in town with the following command:

/execute @a ~ ~ ~ tp @e[type=EntityHorse,r=1] <x> <y> <z>

and then to teleport everyone to the meeting place with a standard teleport command.

For some clarification, this is what the above command does: at the location of every player, execute a teleport, filtering on horses that are within 1 block of a player, to the coordinates <x> <y> <z>.

As I said, this is tested on the latest snapshot (14w20b), and so may not work as expected with earlier versions.

1
  • This was very helpful! First time that I tried it, while on my horse, it teleported me but not my horse. (It said that my horse was teleported, but I couldn't find him anywhere.) Next time I tried it, I stood next to my horse and added a couple of blocks to the Y coord. I don't know which one of these did the trick, but when I teleported over, my horse was standing exactly where he should have been. Thanks!
    – Quixrick
    Apr 27, 2015 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .