Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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?

share|improve this question
    
you'd need to teleport the entity he is mounted on as well –  ratchet freak Dec 30 '13 at 18:43
    
and how can I do it with command blocks? –  André Maldonado Dec 31 '13 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)) –  James Of Da Peach Feb 12 at 2:33

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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