Minecraft:Commands/teleport: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (One intermediate revision by the same user not shown) | |||
| Line 71: | Line 71: | ||
{{el|je|short=1}}: {{argument|facingAnchor|entity_anchor}} | {{el|je|short=1}}: {{argument|facingAnchor|entity_anchor}} | ||
: Specifies | : Specifies the entity's eyes or feet to make the target(s) facing to. If not specified, defaults to feet. {{IN|java}}, the anchor of the targets can be changed with {{cmd|execute anchored}}. {{IN|bedrock}}, always facing the entity's feet from the targets' feet. | ||
: {{arg desc|je=entity_anchor}} | : {{arg desc|je=entity_anchor}} | ||
| Line 133: | Line 133: | ||
|{{HistoryLine|java}} | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.10|dev=pre1|Added {{cmd|teleport|link=none}}, which is like {{cmd|tp|link=Commands/tp/Before Java Edition 17w45a}}, except that the target parameter is mandatory, the 'teleport to other player' usage is unavailable, and the use of relative coordinates is relative to the executor of the command, rather than relative to the target.}} | |{{HistoryLine||1.10|dev=pre1|Added {{cmd|teleport|link=none}}, which is like {{cmd|tp|link=Commands/tp/Before Java Edition 17w45a}}, except that the target parameter is mandatory, the 'teleport to other player' usage is unavailable, and the use of relative coordinates is relative to the executor of the command, rather than relative to the target.}} | ||
|{{HistoryLine||1.13|dev=17w45a|{{cmd|tp|link=none}} is no longer different from {{cmd|teleport|link=none}} now, and | |{{HistoryLine||1.13|dev=17w45a|{{cmd|tp|link=none}} is no longer different from {{cmd|teleport|link=none}} now, and now is an alias of {{cmd|teleport|link=none}}.}} | ||
|{{HistoryLine|||dev=18w01a|Added <code>facing</code> to {{cmd|teleport|link=none}}, which causes the target entity to face an entity or a location.}} | |{{HistoryLine|||dev=18w01a|Added <code>facing</code> to {{cmd|teleport|link=none}}, which causes the target entity to face an entity or a location.}} | ||
|{{HistoryLine|||dev=18w02a|{{cmd|teleport|link=none}} has been simplified a bit and players can now teleport to entities in other dimensions.}} | |{{HistoryLine|||dev=18w02a|{{cmd|teleport|link=none}} has been simplified a bit and players can now teleport to entities in other dimensions.}} | ||
Latest revision as of 11:17, 9 August 2026
|
For the {{{Description}}} of the same name, see [[{{{Destination}}}]]. |
Teleports Minecraft:entities (players, mobs, etc.).
Although most Minecraft:commands can affect only Minecraft:chunks that have already been generated, Template:Cmd can send entities into chunks that have yet to be generated. Right before teleporting, the game generates the destination chunk.
Syntax
- Java Edition
teleport <destination>teleport <targets> <destination>- Teleports the executor or the specified entity(s) to the position of an entity, and makes its rotation the same as the specified entity's.
teleport <location>- Teleports the executor to a certain position (and changes its rotation to the command's execution rotation).
teleport <targets> <location>- Teleports the entity(s) to a certain position (without changing their rotation).
teleport <targets> <location> <rotation>teleport <targets> <location> facing <facingLocation>teleport <targets> <location> facing entity <facingEntity> [<facingAnchor>]- Teleports the entity(s) to a certain position and changes their rotation to the specified rotation.
- Bedrock Edition
teleport <destination: target>teleport <victim: target> <destination: target> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to the position of an entity, and makes it face horizontally, and make its horizontal rotation the same as the specified entity's.
teleport <destination: x y z> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to a certain position (without changing its rotation).
teleport <destination: x y z> [yRot: value] [xRot: value] [checkForBlocks: Boolean]teleport <destination: x y z> facing <lookAtPosition: x y z> [checkForBlocks: Boolean]teleport <destination: x y z> facing <lookAtEntity: target> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> [yRot: value] [xRot: value] [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> facing <lookAtPosition: x y z> [checkForBlocks: Boolean]teleport <victim: target> <destination: x y z> facing <lookAtEntity: target> [checkForBlocks: Boolean]- Teleports the executor or the specified entity(s) to a certain position and changes their rotation to the specified rotation.
Arguments
- Specifies the entity(s) to be teleported. If not specified, defaults to the command's executor.
- Template:Arg desc
- Specifies the coordinates to teleport the target(s) to.
- Template:Arg desc
- Specifies the entity to teleport the target(s) to.
- Template:Arg desc
Template:El: Template:Argument
Template:El: Template:Argument and Template:Argument
- Specifies the rotation.
- Template:Arg desc
- Specifies the coordinates to make the target(s) facing to.
- Template:Arg desc
- Specifies the entity to make the target(s) facing to.
- Template:Arg desc
Template:El: Template:Argument
- Specifies the entity's eyes or feet to make the target(s) facing to. If not specified, defaults to feet. Template:IN, the anchor of the targets can be changed with Template:Cmd. Template:IN, always facing the entity's feet from the targets' feet.
- Template:Arg desc
Template:El: Template:Argument
- Template:Arg desc
- If set to
true, teleports the target(s) only if the target(s) would not collide with a block it cannot be inside (Note: this allows teleporting into flowers as well as midair). Iffalseor not specified, the default behavior applies (do no check; just teleport the target(s)).
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To teleport the executing player to Alice:
teleport Alice
- To teleport all players to the executing player:
teleport @a @s
- To teleport the executing player to x=100 and z=100, but three blocks above their current position:
teleport 100 ~3 100 - To teleport the executing player 1 block forward
teleport ^ ^ ^1
- To rotate the nearest player 10 degrees to the right without changing their position:
execute as @p at @s run teleport @s ~ ~ ~ ~10 ~
- When used via the execute command, can teleport between the Overworld, the Nether and the End:
- To teleport the executing player to the same coordinates, but in the Nether:
execute in minecraft:the_nether run teleport ~ ~ ~Template:Onlyexecute in nether run teleport ~ ~ ~Template:Only
- To teleport all players to x=84 y=57 z=79 in the End:
execute as @a in minecraft:the_end run teleport 84 57 79Template:Onlyexecute as @a in the_end run teleport 84 57 79Template:Only
- To teleport Alex to x=251 y=64 z=-160 in the Overworld:
execute as Alex in minecraft:overworld run teleport 251 64 -160Template:Onlyexecute as Alex in overworld run teleport 251 64 -160Template:Only
- To teleport the executing player to the same coordinates, but in the Nether:
History
Java Edition
Bedrock Edition
External links
Minecraft:de:Befehl/teleport Minecraft:es:Comandos/tp Minecraft:ja:コマンド/teleport Minecraft:pt:Comandos/teleport Minecraft:ru:Команды консоли/teleport Minecraft:zh:命令/teleport