Minecraft Setblock Command Generator Java & Bedrock
Use this Setblock Command Generator to create commands in Minecraft Java & Bedrock Edition 1.21+ and 26+. Choose any block, set the coordinates, and easily configure Block States such as facing, axis, waterlogged, and more. You can also select replace, keep, or destroy mode to control how the block is placed.
Select your Minecraft edition:
Generated /setblock Command
setblock...Want cheap and lag-free Minecraft hosting?
I recommend Sparked Host: affordable plans, great performance, easy panel and fast support.
🚀 Start your Minecraft ServerHow to Use the Setblock Command in Minecraft
The Setblock command allows you to place any block at a specific location in the world. It is widely used to create maps, structures, redstone contraptions, datapacks, and automated systems, eliminating the need to place blocks manually.
In Java Edition, the basic syntax is:
/setblock ~ ~ ~ minecraft:stone
This command places a stone block exactly at the player's current position.
Setblock Command Examples (Java)
Place a Diamond Block
/setblock ~ ~ ~ minecraft:diamond_block
Place a Chest Facing North
/setblock ~ ~ ~ minecraft:chest[facing=north]
Replace a Block at Fixed Coordinates
/setblock 100 64 100 minecraft:glass replace
Place a Block Only if the Space is Empty
/setblock ~ ~ ~ minecraft:torch keep
Setblock Command Examples (Bedrock)
Place a Stone Block
/setblock ~ ~ ~ stone
Destroy the Existing Block Before Placing Another
/setblock ~ ~ ~ gold_block destroy
Frequently Asked Questions
How do I use the setblock command in Minecraft?
Choose the block, enter the coordinates, and optionally configure the block states and placement mode. Then execute a command such as: /setblock ~ ~ ~ minecraft:stone
What is the difference between replace, keep, and destroy?
Replace replaces any existing block, keep places the block only if the target space is empty, and destroy breaks the existing block before placing the new one.
What are Block States in the setblock command?
Block States define specific block properties such as facing, axis, waterlogged, powered, open, and many others.
Does the setblock command work in Bedrock Edition?
Yes. However, some Block States and parts of the command syntax differ from Java Edition.
Can I use relative coordinates with the setblock command?
Yes. Simply use the ~ symbol in the coordinates, for example: /setblock ~ ~1 ~ minecraft:stone