Minecraft Bedrock /setblock Command

Bedrock commands

Changes a block to another block.

  • operator and command block
  • cheats are needed
  • Bedrock 1.26.50.4
My Game select version

Save your preferences in this browser and apply them to supported tools. Settings in a shared link take priority. Wiki version labels are not affected.

On this page 6 sections

At a glance

Chat examples — below

  • Place a Diamond block above yourself
    /setblock ~ ~1 ~ diamond_block

Changes a block to another block. Requires enabled cheats. In Java, a similar command is — /setblock, but is stored differently.

How to record?

  • /setblock <position> <tileName> <blockStates> [oldBlockHandling]
  • /setblock <position> <tileName> [oldBlockHandling]

In angular brackets — what must be written; in square brackets — optional. Words without brackets are written as-is.

Parameters

ParameterWhat to write
positionx, y, z coordinates (can use ~ and ^)
tileNameblock ID, for example stone (total 2648)
blockStatesblock state in square brackets
oldBlockHandlingone of: replace, destroy, keep

Who can

WhatValue
The command/setblock
Who canoperator and command block
Cheats are requiredyes
Variants of recording2
In Java/setblock

Frequently asked questions

What does /setblock do in Bedrock?

Changes a block to another block.

Why doesn't /setblock work?

Commands require cheats: they are enabled in the world settings — after which achievements in this world are no longer awarded. This command can be executed by the world host or a command block.

What is different about /setblock in Bedrock compared to Java?

In Java, there is a /setblock command, but it is written differently: each edition has its own parameters, names, and order. The Java command will not work as-is in Bedrock.

Commands nearby

Minecraft Bedrock 1.26.50.4 data: commands, parameters, and descriptions — from Mojang's official bedrock-samples repository.