Commands work by typing in chat (chat is opened by pressing t) a forward slash, the name of the command and whatever arguments you pass to it. For example, there is the /tp command. Its documentation is on the Minecraft Wiki, and its general form syntax is complicated, however, by looking at examples you can guess what it means. In the /tp
command there's multiple options for what you can do, but the easiest one is to just say the 3 numbers of where you want to go to. For example, if I want to go to a sea outpost at -257 73 83 then you would type /tp -257 73 83
. There are also @ identifiers to select players. They include @a for every player, @p for whoever executed the command, and @r for a random player.
The /fill
command fills a cube with blocks. There are many uses for this but, by far, the most common one is filling an area with TNT! An example is provided on the left. There is absolute and relative positioning in Minecraft. The default is absolute positioning, where the x y and z are based on a single block in the world. The relative positioning means you can reference coordinates relative to where the player is located. You declare it to be relative by putting a tilde (~) in front of the number. For example, if you want to make a 10 by 10 cube of stone from the bottom of the world to the top next to where you are, you can do that by typing /fill ~-11 1 ~-11 ~-1 255 ~-1 stone
. There are 2 sets of coordinates for the lower left and upper right corners of the rectangular prism that you have created. It is /fill x1 y1 z1 x2 y2 z2 material
.
The /give command gives items of your choosing to players. For example, a /give
command can give a stack of golden apples to every player. The aforementioned command can be performed by running /give @a golden_apple 64
. This gives every player 64 apples, which is known as a stack. If you're doing PvP but you are the operator and feel like cheating, you can give yourself a diamond sword by typing /give @p diamond_sword 1
. If you give a player more items than they can carry, the spares are thrown on the ground in front of them as shown in the picture to the right.
Similar to commands, there are command blocks that run commands when they receive a redstone signal. They range from very simplistic to very complex. There could be a single command block on repeat summoning primed TNT, spawning a mob such as a zombie or wither, or even going as far as continuously killing a player whenever they respawn. Command blocks have lots of potential to create good but can be used maliciously. As spiderman once said, "With great power comes great responsibility", a theme common in games, and even technology in general, highlighted through the powerful command blocks with the power to irreversibly change your world and the experience of playing it for all of its players.