Place a Command Block
Create a command block at your location for automation
⚠︎ Awaiting in-game verification for Java 26.2Places a command block above you facing up. Modify the Command property to run different commands.
/setblock ~ ~1 ~ command_block[facing=up]{Command:"/say Hello"}63 characters
- Java: yes
- Bedrock: no
- Command block: no
- Needs cheats / OP: yes
How to use
- Java: open chat (T) and paste the command with your desired command inside.
- Press Enter — the command block appears.
- Right-click to edit and run commands.
Related commands
Place a working mob spawner that continuously spawns zombies
/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"minecraft:zombie"}}}Delete a region of blocks by filling it with air
/fill ~ ~ ~ ~10 ~10 ~10 airCreate a hollow room or box out of any block
/fill ~ ~ ~ ~10 ~6 ~10 stone hollowCreate a pool or lake by filling a region with water
/fill ~ ~ ~ ~10 ~ ~10 water