All maps archive
MinecraftMaps.com
Adventure
Parkour
Survival
Puzzle
Horror
Mini-Games
Builds
MinecraftMaps.com

The largest collection of Minecraft maps. Download adventure, parkour, survival, puzzle, and more maps for free.

Categories

  • Adventure Maps
  • Parkour Maps
  • Survival Maps
  • Puzzle Maps
  • Horror Maps
  • Creation Maps

Resources

  • Latest Maps
  • Popular Maps
  • Hall of Fame
  • Search Maps
  • Minecraft Tools
  • Submit a Map
  • Minecraft Seeds

Information

  • How to Install Maps
  • FAQ
  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

Game Databases

  • Valheim Wiki
  • Persona Compendium
  • Solarpunk Tools
  • Gothic 1 Remake Wiki
  • Fatekeeper Tools
  • Romestead Database
  • Stardew Valley Database
AFK Arena|Game Guides|Co-op Games|Pokemon Tools|Anime Filler List|Naruto

Copyright © MinecraftMaps.com 2011-2026. All rights reserved.

Minecraft was created by Mojang. MinecraftMaps.com is not endorsed or affiliated with Mojang.

Setblock Command - Place Any Block At Exact Coordinates

Build a /setblock command to place a single block at specific coordinates with destroy, keep, or replace modes.

Generated Command

/setblock ~ ~ ~ minecraft:stone replace
Version

Use ~ for relative, ^ for local coordinates, or absolute numbers.

Selected:minecraft:stone

What Is the Minecraft Setblock Command?

The /setblock command places a single block at an exact X, Y, Z coordinate in your Minecraft world. This generator builds the correct syntax for any block, with block state options and placement modes, ready to paste into chat or a command block.

The syntax is /setblock <pos> <block> [destroy|keep|replace]. You provide coordinates, a block ID, and optionally a placement mode. The command works in singleplayer with cheats enabled, on multiplayer servers with operator permissions, and inside command blocks for automation.

Where /setblock really shines is precision work: placing a single block in an exact spot or swapping one block in a build without breaking its neighbors. For filling larger areas, pair it with the /fill command instead.

Setblock Placement Modes Explained

The placement mode controls what happens to the block already at the target position. Each mode behaves differently:

ModeBehaviorDrops ItemsBest For
replaceSilently overwrites the existing blockNoClean block swaps, building
destroyBreaks the existing block as if mined by a playerYesSimulating block breaks, resource farming
keepOnly places block if position is air or fluidNoFilling gaps without overwriting builds

Tip: the destroy mode plays the block-breaking sound and spawns break particles. If you run setblock in a rapid loop via command blocks, this can cause lag. Use replace for silent, performance-friendly placement.

Block States Reference

Many blocks have configurable states. Block states are appended in square brackets after the block ID. Here are the most common state properties:

PropertyValues
facingnorth, south, east, west (+ up/down for some)
halftop, bottom (or upper, lower for doors)
axisx, y, z
typetop, bottom, double (slabs)
shapestraight, inner_left, inner_right, outer_left, outer_right (stairs)
littrue, false
poweredtrue, false

Example: /setblock ~ ~ ~ oak_stairs[facing=east,half=top,shape=straight] places oak stairs facing east on their top half. Append the states you need after the block ID, separated by commas.

Frequently Asked Questions

What does the /setblock command do in Minecraft?

It places a single block at a specific X, Y, Z coordinate. You choose a block from the Java Edition registry, configure optional block states, and select a placement mode (destroy, keep, or replace). It requires cheats or operator permissions to use.

What is the difference between destroy, keep, and replace?

Replace (default) silently swaps the existing block. Destroy breaks the existing block as if mined, dropping items and playing the break sound. Keep only places the block if the target position contains air or a fluid.

Can /setblock use relative coordinates?

Yes. Use the tilde (~) prefix for coordinates relative to the executor's position. For example, /setblock ~ ~-1 ~ stone places stone one block below you. You can also use caret (^) notation for local coordinates based on your facing direction.

How do you set block states with /setblock?

Append states in square brackets after the block ID: /setblock ~ ~ ~ oak_stairs[facing=east,half=top]. Many blocks have configurable states including facing, half, axis, shape, and powered.

Browse more Minecraft tools:

Give Command GeneratorBrowse All Tools

Related tools

FillFill regions with various fill modesCloneClone block regions with filter optionsLocateFind structures, biomes, and POIsWorldborderWorld border size, center, and damageFillbiome CommandGenerate /fillbiome commands to repaint biomesForceload CommandGenerate /forceload commands to keep chunks loaded