Minecraft Tutorial: Command Blocks

Minecraft Command Block Featured Ecran Partage

This article covers the basics about command blocks in Minecraft Bedrock: what they are, their uses, and examples of how to use them.

Command Blocks in Minecraft: What are they?

A command block is an item that can be generated in a Minecraft world to allow players to use commands that cause various effects according to specific parameters.

Using a command block opens a tab in which it is possible to enter the desired command. They can be placed one beside the other to create a chain of effects.

Minecraft Command Block 1 Ecran Partagé
The different sides of a command block

Getting Started with Command Blocks

If you want to introduce a command block into your Minecraft world, it’s important that Cheats are enabled and that the coordinates are set to be visible when the world is created. This can be done in the settings at the world creation (see our article covering these settings).

Then, the only way to get a command block is by entering the following command in the chat : /give @p command_block. By doing so, the person who wrote the command will receive a command block in their inventory.

To use the command block, it must first be placed on the ground.

The faces of the block have arrows. They always point in the direction of the player character when the block is placed on the ground. Arrows affect the order in which commands are executed.

To assign a command to a block, simply click on it with the Use button and the interface of the block will appear. Once the command is written to the block, you can close the interface and the block will act according to the parameters assigned to it.

Command options

The command block interface allows you to set up several parameters.

Minecraft Command Block 2 Ecran Partagé
The interface of a command block

The different block types define how the block activates and are as follow :

  • Impulse: the block is activated by a redstone signal
  • Chain: The block is activated when another block that has the arrow pointing in its direction is activated
  • Repeat: the block is activated with every tick in the game (ticks are by default at 20 per second), as long as it receives a redstone signal

Conditions are used to define conditions for the block to execute:

  • Conditional: The block activates only if the block preceding it in the chain has also activated successfully
  • Unconditional: the block activates

The Redstone parameter defines whether the block needs a redstone signal to activate:

  • Needs Redstone: The block needs a redstone signal to activate
  • Always Active: The block will always be active, regardless of redstone signals

The Delay in Ticks parameter is used to set the latency time (in ticks) between when the block receives a redstone signal and when the command is executed.

Enabling the Execute on First Tick parameter on a block that has a delay will cause the command to fire as soon as the block meets its activation conditions by ignoring the first delay.

Examples of commands

In conclusion, here are examples of commands that are often used with the blocks:

  • /give @ [item name] : To be written without the [], to make items appear in the inventory
  • /locate biome [biome name] : To be written without the [], to display the coordinates of the nearest biome
  • /locate structure [structure name] : To be written without the [], to display the coordinates of the closest structure of that type
  • /summon [entity name] : To be written without the [], to make an entity appear in the world
  • /tp @ x y z or /teleport @ x y z: To teleport the named entity or entities to the point designated by the coordinates
  • /seed: to display the world’s seed
  • Click here for a full list of commands

As for the @, they can be replaced by:

  • @p: Refers to the character closest to where the command is triggered
  • @r: A random player character
  • @a: All player characters
  • @e: All entities
  • @s: The entity that triggered the command, oneself
  • [player character pseudonym] : to be written without the [], the designated player character