How the Minecraft Fill Command Works
The basic Java Edition syntax is /fill <from> <to> <block> [destroy|hollow|keep|outline|replace]. The first and second positions define opposite corners of a rectangular region.
- Replace: fills every block in the selected region.
- Keep: fills only air blocks, protecting existing builds.
- Outline: fills only the outer shell of the selected region.
- Hollow: creates an outer shell and replaces the inside with air.
- Destroy: breaks existing blocks before filling the region.
Fill Command Example
/fill ~ ~ ~ ~9 ~4 ~9 minecraft:glass hollow
This creates a hollow glass cuboid from the executor's position to a point nine blocks across and four blocks upward. Use Setblock Command Generator for one block at a time, or browse Minecraft Block IDs to find a different modern block ID.