Our server Your next world? minecraft.pl Join
Discord
Our server Adventure? Jump in with us. minecraft.pl • Java & Bedrock Join the game
Guide 7 of 12

Command Blocks: the basics

Command block types, their modes, delays and how to build simple setups.

Difficulty: Easy 9 topics 5 tips

Introduction

Command blocks are special blocks in Minecraft that run commands automatically, with no input from the player. They're the foundation of adventure maps, minigames, server systems and automation in Creative mode. There are three types of command blocks: Impulse (orange), which runs its command once when it receives a redstone signal; Chain (green), which runs its command right after the previous command block in the chain has finished; and Repeat (purple), which runs its command every game tick (20 times per second) for as long as it receives a signal. Every command block can work in Conditional or Unconditional mode. Conditional mode checks whether the previous command block in the chain ran successfully, which lets you build if-else conditions without /execute if. Command blocks also have a Needs Redstone / Always Active toggle: in Always Active mode, Chain and Repeat blocks work without an external redstone signal. To get a command block, use the /give @s command_block command. To edit the command in a block, right-click it. You build command block chains by placing the blocks one after another: the arrow on each block shows the direction in which the chain continues. A typical setup is Repeat → Chain → Chain → Chain, where the Repeat block starts the sequence and the Chain blocks after it run the next commands.

Topics covered in this guide

Here are the topics this guide covers. Each one comes with a detailed explanation, example commands and practical uses.

  1. The three types of command blocks: Impulse, Chain, Repeat
  2. Conditional and Unconditional modes
  3. Needs Redstone vs Always Active
  4. How to get a command block: /give
  5. Editing the command in a block: the interface
  6. Building chains: the direction of the arrow
  7. Redstone signals and command blocks: buttons, clocks
  8. A practical example: a welcome system for new players
  9. Organizing command blocks in your world: labels and keeping things tidy

Tips and tricks

Practical tips we picked up while working with this part of Minecraft. Remember them: they'll save you hours of trial and error.

  • Get a command block with a command: /give @s minecraft:command_block.
  • A chain of Chain command blocks has to be continuous: each block's arrow must point into the next one.
  • Repeat + Always Active is the equivalent of a ticking function in a data pack: it runs 20 times per second.
  • Conditional mode checks whether the PREVIOUS block in the chain succeeded, not the block that powered it with redstone.
  • Use /gamerule commandBlockOutput false to stop command blocks from spamming the chat.

Difficulty level

This guide is rated Easy (2/5). You don't need any previous knowledge of commands, so it's a perfect place to start.

Tags

command blockimpulsechainrepeatredstonechainsbasics

Related guides

Useful tools