How To Use The Minecraft Teleport Command – Step by Step Tutorial
Hey everybody, it’s UnderMyCap and welcome back to another YouTube video! Today I’m going to be showing you how to use the
/teleport command in Minecraft.
Two Ways To Use The /tp Command
Before we get into it, there are two ways you can use the /tp command. You can either do it in the chat/command log, or you can use it in a command block. The command block is more flexible because you can have it repeating constantly if you want, or you can set it up so that every so often you press a button and it activates. Everything I do in the command block will work fine in your chat as well, so don’t worry about that.
Basic /tp Command Syntax
To use the /tp command, you type in
/tp and then you type in who you want to teleport, which is either the player name or you can use selector tags. These tags categorise all the entities in the game and make it much easier to list off and teleport things. For example,
@a is all players, so if you used this command and teleported people to a location, every single player in the world would be teleported right to that block. In some ways you may want that, and in some ways you may not.
For a basic example, let’s use my own name —
UnderMyCap. After the player name, you type in where you want to teleport them. Since there’s no one else here, I want to teleport to some type of coordinates. I use these squiggly lines (
~), which work kind of like coordinates but relative to the command block. If I used
~ ~ ~ it would teleport me directly to the command block, and if I used
~ ~3 ~ it would teleport me three blocks above the command block. The first squiggly line represents
X, the second represents
Y, and the third represents
Z. After typing in the command you can press done, and when you press the button it will teleport that player to the set location.
Understanding Entity Selectors
Now let’s talk about all of the selector tags.
@e basically targets every single entity in the whole entire Minecraft world. If you used this and pointed everything to one block, it would teleport every single entity to that block. You don’t really want this to happen because, one, if you don’t have a super powerful computer it will lag and crash, and two, it’s really annoying because it teleports armour stands, item holders, and basically everything.
Narrowing Things Down With Tags
To narrow it down, you want to add tags to make it more specific. The
type tag lets you specify the type of mob you want to teleport. If you type
type= a whole bunch of entities will appear for you to choose from. If you put an exclamation mark in front of the mob type, it will
not teleport that mob, but will teleport every single other entity. So if you did
type=!player it will not teleport any players to the position, but will teleport every other mob in the game.
For example, say there are a lot of pigs around. If you want them all to teleport to a block without teleporting yourself, using
type=!player means all the pigs will teleport to that one spot. If the command is set to repeat, they’ll all stay there until the redstone signal stops. If you want to be even more specific, you can replace
type=!player with
type=pig — that way only pigs will be teleported to the spot, so if there are cows around, only the pigs will be moved.
Using Name Tags For Specific Targeting
Now let’s say you want to be super specific, like teleporting only a mob with a particular name. To do this, you need a name tag. Rename your name tag to whatever you want — for this example I’ll use
“example”. This is a very important bit — the name you give your name tag has to be entered into the command block with the correct capitalisation, because it is case sensitive. So in the command you’d write
name=example. What this does is teleport any mob that has that specific name to the target spot.
To test this, I set the command block to always active. If I go up to a pig and rename it with the name tag, it gets teleported to the spot I wanted. It works with different mob types as well. If a mob is renamed to something misspelled, you’ll notice it starts to drop away from the spot, meaning it no longer matches the name in the command.
@p and @r Selectors
Now that we’ve covered
@e,
@a, name tags, and entity types, let’s talk about
@p and
@r.
@p teleports the closest player to the command block to a certain location. Since I’m the only player in the world, it will recognise me as the closest player and teleport me to the set spot.
@r on the other hand selects a
random player in the world and teleports them to the selected location.
Wrapping Up
That’s basically a short overview of how to use /teleport in Minecraft! If you did like this video please leave a like and subscribe to the channel, it would be greatly appreciated. Comment if you enjoyed the video, what I can do to make it better, and what you’d like me to cover next. My social links are in the description as well as my Patreon if you’d like to support me. I hope you enjoyed this one!