ModsCraft » Guides » Command Block [Minecraft Guides]

Command Block [Minecraft Guides]

WhatsApp
Telegram VKontakte Odnoklassniki Pinterest
Command Block [Minecraft Guides]

A command block allows you to execute the same commands in Minecraft as you would in the regular chat. So what is a command block, how do you get it, and how do you use it? In this article, we'll tell you all about it!

Command Block [Minecraft Guides]

It's a really useful block that expands the possibilities for creating maps in Minecraft.

You can find a full list of commands on the Console Commands page, but not all of them work in Minecraft on Android, iOS, and Windows 10 versions.

+ of command blocks in MCPE:

  • Unlike the PC version, command blocks in PE don't cause heavy lag, so FPS stays stable.
  • The command block interface is adapted for mobile devices.

- of command blocks in MCPE:

  • Too limited functionality.

How to get a command block?

You can't craft a command block in the game, but you can give yourself one using the command /give Steve command_block, where Steve is the player's username. You can also use @p instead of Steve to give the block to yourself. Don't forget to enable cheats in the world settings.

How to enter a command into a command block?

To do this, open its interface. It's very easy: just tap on it. In the Command Input field, enter the command that the command block will execute. Below that, there's a field where you can see an error if you entered something wrong.

Example commands:

  • give @p apple 5 - gives the player five apples.
  • setblock ~ ~+1 ~ wool - places a wool block at the player's coordinates.
  • tp Player 48 41 14 - teleports the player named Player to coordinates x=48, y=41, z=14.

Who do command blocks work with?

Using selectors, you can target a player or entity for the command to affect:

  • @p — the player who activated the command.
  • @a — all players.
  • @r — a random player.
  • @e — all entities (including mobs).

Additional selectors:

How do you, for example, teleport all players to a certain point except yourself? Easy: use additional selectors, e.g., tp @a[name!=Admin] 228 811 381 teleports all players except the one named Admin to x=228, y=811, z=381. All parameters:

  • x — X coordinate. If you use ~ instead of a value, the point will be the command block's location.
  • y — Y coordinate. If you use ~ instead of a value, the point will be the command block's location.
  • z — Z coordinate. If you use ~ instead of a value, the point will be the command block's location.
  • r — maximum search radius.
  • rm — minimum search radius.
  • m — game mode.
  • l — maximum experience level.
  • lm — minimum experience level.
  • name — player's username.
  • c — additional argument for @a that limits the number of players affected. For example, @a[c=5] affects the first five players in the list, @a[c=-5] affects the last five.
  • type — for example, the command /kill @e[type=Skeleton] kills all skeletons, and /kill @e[type=!Player] kills all entities that are not players.

Example command:

  • give @p gold_ingot 20 - gives the nearest player within a 10-block radius 20 gold ingots.

Command Block Modes

There are three command block modes: Impulse, Chain, and Repeat - the block's color changes depending on the mode.

  • Impulse mode (orange): activates the specified command once.
  • Chain mode (green): the command runs if the block is attached to another command block and connects to other command blocks.
  • Repeat mode (blue): the command repeats every tick while the block is powered.

Impulse Mode

These are standard command blocks used to interact with chain blocks, but you can also execute commands directly in these blocks.

Chain Mode

As the name suggests, this mode works like a chain.

Note that for a chain block to work, you need an impulse command block to send the signal, as well as a redstone block - without it, the chain command block won't work.

The title command and its parameters:

  • title clear - clears messages from the player's screen.
  • title reset - clears messages and resets parameters.
  • title title - the main title displayed on screen.
  • title subtitle - the subtitle displayed when the title appears.
  • title actionbar - displays text above the inventory.
  • title times - fade-in, stay, and fade-out times. Default values: 10 (0.5s), 70 (3.5s), and 20 (1s).

Example commands:

  • title @a title §6Beginning - title with orange color.
  • title @a actionbar Hello! - displays text above the inventory.
  • title @a subtitle Chapter 1 - subtitle.

Repeat Mode

Executes the command as long as the command block is powered by redstone. For example, tp @e[type=pig] ~ ~+ ~ will teleport all found pigs to the command block's location with a height offset of +1.

That concludes our guide on command blocks. If the developers add anything new for mobile command blocks, we'll update this article and let you know about the new features!

wink
327 comments
  1. Guest avatar
    Водочкин
    18:43 24 Mar 21
    Эм где обнова гайда
  2. Guest avatar
    Имя
    10:58 20 Mar 21
    Ілля 2021
    485
  3. Guest avatar
    Rezoc
    12:00 7 Mar 21
    Как сделать чтоб командный блок подавал сигнал когда в воронку падает определенный предмет?
    1. Guest avatar
      Wector
      23:53 18 Aug 21
      Самый простой способ - сравнить 2 воронки командой testforblocks.
      Как это сделать:
      Представим что у тебя где-то уже есть воронка в которую должен попасть определённый предмет (будем называть её "воронка1").
      Теперь попробуй поставить ещё одну воронку где угодно в мире с таким же положением как и воронка1 (будем называть её "воронка2"), затем положи в неё тот предмет который должен попасть в воронку1 (с любым именем, зачарованием, в любом количестве).
      Отлично, заготовку мы сделали, теперь создадим командный блок и впишем в него команду:
      /testforblocks (координаты воронки2) (снова координаты воронки2) и (координаты воронки1).
      Превосходно, при активации команды команда не будет выполнятся до тех пор пока в воронке1 не появится столько же или тот же предмет что в воронке2.
  4. Guest avatar
    Кто-то
    16:04 24 Feb 21
    Какой блин PE, уже 4 год не поддерживают его. Сейчас BE
    1. Guest avatar
      Неизвестный
      0:01 26 Feb 21
      Ти видел когда етот пост вышел 2017 году такшо среди и
    2. Guest avatar
      Ст
      9:44 27 Mar 21
      Какой BE?
      1. Guest avatar
        Ягон Дон
        18:51 13 Apr 21
        ВЕ
        Вedrock
        Edition
    3. Guest avatar
      Socol
      12:40 24 May 21
      У меня pe есть сборники версий minecraft
  5. Guest avatar
    анонимус
    19:40 29 Jan 21
    как мечи и тд выдавать
    1. Guest avatar
      Кто-то
      2:33 14 Mar 21
      Пишешь: /give @s diamond_sworld это можно написать в чате а не в блоке
      1. Guest avatar
        хз кто
        15:03 26 May 21
        правильно писать не
        /give @s diamond_sworLd , а
        /give @s diamond_sword
  6. Guest avatar
    Ваня
    16:55 24 Jan 21
    Ваня привет в приложении я могу в любое
  7. Guest avatar
    Имран
    21:46 16 Jan 21
    А почему я пишу give предмет количество но мне не выдаеться предмет.А пишет команда задана.И ничего не происходит
    1. Guest avatar
      Не правильно
      11:17 23 Feb 21
      Give @p (предмет)
  8. Guest avatar
    Виталий
    17:34 16 Jan 21
    Как вставить скопированную команду?
    1. Guest avatar
      Wector
      23:56 18 Aug 21
      Поробуй найти в клавиатуре инструмент "редактирование текста", там есть функция вставки и она работает даже в майнкрафте.
    2. Guest avatar
      Ривер
      18:00 13 Oct 21
      ?........... ...
  9. Guest avatar
    Виталя
    12:38 13 Jan 21
    когда я вел команду нажал на кнопку у меня заспавнился песок на командном блоке
  10. Guest avatar
    Replicon
    12:09 10 Jan 21
    Как сделать так чтобы командный блок выдавал 1 предмет 1 игроку тип игрок его активировал и ему выдался предмет и после 2 активации тем же игроком предмет больше не выдаётся этому игроку
    1. Guest avatar
      Wector
      0:01 19 Aug 21
      Это будет сложно сделать.
      Для этого нужна целая цепочка из командных блоков, проще просто задать радиус активации (если игрок находится на расстоянии 3 блока от командного блока то ему выдастся предмет, в противном случае нет.
      Для этого напишите так:
      /give @p[r=3]... и тд.

Immerse yourself in a unique adventure with classic survival, anarchy, a clan system, and constant events!…

PvP, Survival
IP:Port craft.pe:19132
Online 400 / 1501
Version 1.1 - 1.26
Play