Minecraft Java ยท 1.16+
/fill
Fill a region, build a shell or replace selected blocks.
Select the region
Enter two opposite corners. Both corners are included, so 0 through 5 spans six blocks.
Shell or outline
Hollow builds a shell and clears its interior. Outline changes the outer faces and preserves interior blocks.
Replace selected blocks
Choose Replace selected and enter an ID such as minecraft:dirt or a tag such as #minecraft:logs.
FAQ Frequently asked questions 30 questions
Essential questions 5
What is /fill used for?
It modifies a rectangular world region by placing blocks, replacing existing blocks or clearing an area.
Can I build a wall quickly?
Yes. Select two opposite wall corners and fill the region with a suitable block after checking the coordinates.
Can /fill remove existing blocks?
Yes. Selecting minecraft:air clears the chosen area and can destroy existing structures.
How is /fill different from /setblock?
/setblock changes one block position, while /fill modifies an entire rectangular region.
Can /fill build a basic house?
Yes. The hollow and outline modes create shells and frames, while detailed structures require additional work.
Syntax and arguments 5
What is the basic /fill syntax?
Use /fill <from> <to> <block> [mode]. The exact optional arguments depend on your Java Edition version.
How many coordinates must I provide?
Specify two opposite corners using X Y Z coordinates for each. Both endpoint blocks are included.
What do tilde coordinates mean?
The ~ symbol represents a coordinate relative to the execution position, such as ~1 for an offset of one block.
How do I specify the block type?
Use a registered block identifier such as minecraft:stone. An ordinary translated display name is not suitable.
What happens if no mode is provided?
Normal replacement behavior applies, and existing blocks in the selected region can be overwritten.
Practical examples 5
How do I fill a small cube with stone?
Run /fill ~ ~ ~ ~1 ~1 ~1 minecraft:stone. It creates a region two blocks wide along each axis.
How do I build a glass outline?
Use /fill ~ ~ ~ ~3 ~3 ~3 minecraft:glass outline. Existing interior blocks are preserved.
How do I create a hollow wooden box?
Run /fill ~ ~ ~ ~4 ~4 ~4 minecraft:oak_planks hollow. The shell becomes wooden and its interior is cleared.
How can I replace only dirt with stone?
Use /fill ~ ~ ~ ~2 ~2 ~2 minecraft:stone replace minecraft:dirt. It changes matching source blocks only.
How do I fill only empty positions?
The keep mode places blocks only at air positions and avoids replacing other existing blocks.
Advanced usage 5
What is the difference between hollow and outline?
hollow creates a shell and clears its interior, while outline modifies the shell and preserves interior contents.
What does destroy mode do?
It replaces blocks while processing destruction and possible item drops. Large regions can create considerable load.
What is strict mode used for?
In supported Java versions it places blocks without ordinary neighbor and block-shape updates during the operation.
How do I calculate the region volume?
Take the absolute coordinate difference plus one for each axis, then multiply the three dimensions.
Can replacement filters match block states?
Yes. Supported block predicates can match states, but their syntax must be checked for the Java version.
Troubleshooting 4
Why does Minecraft report too many blocks?
The selected volume exceeds the configured block modification limit. Divide the operation into smaller regions.
Why did /fill change no blocks?
Possible reasons include unloaded chunks, incorrect coordinates, unmatched filters or an already matching result.
Why did /fill damage another structure?
The coordinates may have included an unintended area. Stop modifying the world and restore from a suitable backup.
Why is the block identifier rejected?
The identifier may be invalid, or its block states may not be supported in the selected game version.
Minecraft versions 3
When was strict mode introduced?
The strict mode was introduced in Java Edition 1.21.5. Older versions do not support this syntax unchanged.
Have /fill limits changed between versions?
Yes. The relevant gamerule names and behavior have changed. Check the exact Java version before using older guides.
Can I use a Java /fill command in Bedrock?
Not always. The editions differ in block-state formats and certain arguments, so commands require verification.
Permissions and safety 3
What permissions does /fill require?
Java Edition normally requires permission level 2. Bulk world modification should not be available to untrusted players.
Does /fill include a built-in undo?
No. The command does not provide automatic undo. Recovery requires a saved world or structure backup.
How can I safely test /fill?
Create a backup, start with a few blocks and verify the mode, coordinates and result before using a larger area.
Rate this tool
Did this tool work for you? Tell us what went well or what could improve.
Sign in to leave a review