How to Use the Setblock Command in Minecraft

Need your block to have more advanced features? Use /setblock!

The /setblock command in Minecraft allows the user to change a block at a specific coordinates in their current Minecraft world to the block specified. The usage and syntax of this command depends on which platform (Java or Bedrock) you are using it. You can see both versions of the syntax below and what to use for each argument (the conditions after the command itself).

Java

Using the command in Java is fairly straightforward and just as customizable as using the command in Bedrock. The syntax is as follows:

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

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

Result: Sets a north-facing furnace at position 45 70 200 that burns for 200 ticks. Replaced block does not make a sound or drop contents.

Arguments

  • <pos>: The position of the block to change. Must comprise x y z coordinates including floating-point numbers, tildes, or caret notations.
  • <block>: The block and arguments to use to set specifics about the block, such as direction and other customization options. Unlike Bedrock, the additional conditions must be added as a part of this argument.
  • [destroy | keep | replace]: Additional option for how to handle placing the new block. Must use only one.
    • destroy: Destroys the block as if a player in Survival destroyed it. Plays the block breaking sound and drops its contents.
    • keep: Only replaces air blocks.
    • replace: Sets the position to the new block, does not play a block breaking sound, and does not drop contents.

Related: Best Minecraft Challenge Maps

Bedrock

In Bedrock, the command tends to be more complicated and requires additional input for specific arguments. The syntax is as follows:

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

Example 1: /setblock 45 70 200 stone_slab ["stone_slab_type": "Quartz", "facing direction":3] destroy

Result: Places an east-facing Quartz Stone Slab at 45 70 200 that destroys the replaced block and drops its contents.

  • <pos>: The position of the block to change. Must comprise x y z coordinates including floating point numbers, tilde, or caret notations.
  • <tileName: Block>: The block to place. Must use block_id.
  • [blockStates]: Addition arguments to use after the tileName argument that specify features about the block being placed.
  • [destroy | keep | replace]: Additional option for how to handle placing the new block. Must use only one.
    • destroy: Destroys the block as if a player in Survival destroyed it. Plays the block breaking sound and drops its contents.
    • keep: Only replaces air blocks.
    • replace: Sets the position to the new block, does not play a block breaking sound, and does not drop contents.

Those are the basics for using the /setblock command! For additional Minecraft guides and content, be sure to visit our Minecraft homepage!

Using the setblock command is a necessary tool in making Adventure Maps in Minecraft! Check out our full list of the Best Adventure Maps to get some ideas for creating your own!

Follow us on Twitter and Facebook to get updates on your favorite games!

About the Author

Freelance writer and jack-of-all-hobbyist-tech-development-trades (website, game, and program). My passion is to create content that entertains and makes people think critically.

Recently Updated Minecraft Posts

Leave a Comment

Comments are on moderation and will be approved in a timely manner. Please read the following rules before commenting:

  • All comments must be on topic and add something of substance to the post
  • No swearing or inappropriate words
  • No asking or begging for anything free
  • Do not attempt to start a poll in the comments
  • Comments in all CAPS will be removed
  • We reserve the right to remove a comment for any reason
  • Do not impersonate a staff member or influencer

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.