How to Use the Setblock Command in Minecraft

How to Use the Setblock Command in Minecraft

The /setblock command allows Minecraft users to modify a block at specific coordinates to the block they specify. Depending on the platform you’re using, the syntax and usage of this command will vary. Below are both versions of syntax. You can also see the conditions that were used for each argument.

Java

Java command is easy to use, and it’s just as configurable as Bedrock command. This is the syntax:

/setblock <pos> <block> [destroy|keep|replace]

Example: /setblock 45 70 200 minecraft:furnace[facing=north]{BurnTime:200} replace

Result: Places a north-facing furnace at 45 70 200, which burns for 200 seconds. The block is not able to make any sound or drop its contents.

Arguments

  • <pos>: The block’s current position. Must contain x y Z coordinates, including floating-point numbers and tildes.
  • <block>: The block and the arguments to use to specify specific information about the block such as direction or other customization options. This argument must contain additional conditions, not Bedrock.
  • [destroy | keep | replace]You can also choose to place the block in a different way. You can only use one.
    • destroy: The block is destroyed as if Survival had destroyed it. You can make the block breaking sound, and then drop its contents.
    • Keep: Replaces only air blocks
    • Replace: Sets the position of the new block. It does not make a sound breaking blocks and it does not drop any contents.

Related: Best Minecraft Challenge Maps

Bedrock

Bedrock commands tend to be more complex and require additional input for specific arguments. The syntax is as below:

/setblock <position: x y z> <tileName: Block> [blockStates: block states] [destroy | keep | replace]

See also  How to make a healing potion in Minecraft

Example 1: 4570 200 stone_slab [“stone_slab_type”: “Quartz”, “facing direction”:3] destroy

Result: Places an East-facing Quartz Stone slab at 45 70 200. This destroys the block that was replaced and drops its contents.

  • <pos>: The new position of the block. It must contain x,y,z coordinates.
  • <tileName: Block>: The block to place. Block_id must be used
  • [blockStates]: Additional arguments to be added after the tileName argument. These additional arguments specify features about the block that are being placed.
  • [destroy | keep | replace]You can also choose to place the block in a different way. You can only use one.
    • destroy: The block is destroyed as if Survival had destroyed it. You can make the block breaking sound, and then drop its contents.
    • Keep: Replaces only air blocks
    • Replace: Sets position to new block. Does not make a block breaking sound.

These are the essentials for using /setblock! Our Minecraft guide and content contains additional information. Minecraft homepage!

You must use the setblock command to create Adventure Maps within Minecraft. See our full list of all the Best Adventure MapsGet some inspiration for making your own!