Fill
;set ;replace ;walls ;faces ;hollow ;fill ;fillrCommands for filling selections, replacing matching blocks, creating shells, covering surfaces, and filling connected air in WorldEdit.
WorldEdit provides two main kinds of fill operations:
- Selection fills modify an existing selection.
- Connected fills start from the placement position and fill connected air without using a selection.
This page only covers commands whose primary purpose is placing blocks into a region, surface, shell, or connected empty space. Pattern and mask syntax are documented on their own pages.
Choose the Right Command
| Command | Uses a selection | Main purpose |
|---|---|---|
;set | Yes | Fill every position in the selection |
;replace | Yes | Fill only positions matching a mask |
;walls | Yes | Fill the side walls |
;faces | Yes | Fill every exterior face |
;hollow | Yes | Replace the interior while preserving a shell |
;fill | No | Fill connected air in a mostly straight direction |
;fillr | No | Recursively fill irregular connected air |
Fill an Entire Selection with ;set
;set places a pattern in every position of the current selection.
Set Syntax
;set <pattern> Fill the selection with one block:
Single Block Fill
;set stone Use a mixed pattern:
Mixed Selection Fill
;set 70%stone,20%andesite,10%gravel Use a saved gradient:
Gradient Selection Fill
;set $wall.up set works with all selection shapes.
In the current
latestimplementation,;setignores the global mask. Use;replacewhen the fill must be restricted to matching blocks.
Fill Matching Blocks with ;replace
;replace changes only blocks that match the supplied mask.
Replace Syntax
;replace <mask> <pattern> Fill only air:
Fill Air in a Selection
;replace air stone Fill only existing blocks:
Fill Existing Blocks
;replace #existing stone Replace several block types:
Replace Multiple Blocks
;replace grass_block,dirt,gravel stone Use a gradient only where the mask matches:
Restricted Gradient Fill
;replace air $cave.rad replace works with all selection shapes.
Fill Side Walls with ;walls
;walls fills only the lateral walls of a selection. It does not create a floor or ceiling.
Walls Syntax
;walls <pattern> [mask] Create stone-brick walls:
Basic Walls
;walls stone_bricks Fill only air positions on the walls:
Restricted Walls
;walls glass air Use a vertical gradient:
Gradient Walls
;walls $wall.up The optional mask is written as the final argument.
Fill Every Exterior Face with ;faces
;faces fills the complete exterior boundary of a selection:
- Side walls
- Floor
- Ceiling
- The exterior surface of non-cuboid selections
Faces Syntax
;faces <pattern> [mask] Create a closed glass shell:
Closed Exterior Shell
;faces glass Fill only air positions on the exterior:
Restricted Exterior Shell
;faces glass air Use a radial gradient:
Gradient Exterior Shell
;faces $light.rad Use ;walls for sides only and ;faces for the complete exterior.
Replace the Interior with ;hollow
;hollow preserves an outer shell and replaces the interior with a pattern.
Hollow Syntax
;hollow [thickness] [pattern] Default values:
Hollow Defaults
thickness = 1
pattern = air Remove the interior and preserve a one-block shell:
Basic Hollow
;hollow Preserve a three-block shell:
Thick Shell
;hollow 3 air Fill the interior with water instead of air:
Water-Filled Interior
;hollow 1 water hollow modifies the interior of existing selected content. It is not the same operation as creating an exterior shell with ;faces.
Fill Connected Air with ;fill
;fill starts at the placement position and fills connected air. It does not use the current selection.
Fill Syntax
;fill <pattern> <radius> [depth] [direction] Default values:
Fill Defaults
depth = 1
direction = down Fill downward with sandstone:
Downward Fill
;fill sandstone 15 8 down Fill upward with glass:
Upward Fill
;fill glass 10 6 up Fill toward the north:
Directional Fill
;fill stone 20 12 north Use the direction you are facing:
Forward Fill
;fill stone 20 12 forward Use a mixed pattern:
Mixed Connected Fill
;fill 70%sandstone,30%sand 20 10 down fill modifies only air. It does not replace solid blocks or fluids.
Its search is not fully recursive: after moving one layer in the selected direction, it does not repeatedly expand sideways from every newly found position. This makes it suitable for wells, ponds, and cavities that remain relatively straight.
Recursively Fill Connected Air with ;fillr
;fillr recursively fills connected air and continues expanding sideways as it advances. It is better suited to caves and irregular cavities.
Recursive Fill Syntax
;fillr <pattern> <radius> [depth] [direction] Default values:
Recursive Fill Defaults
depth = radius
direction = down Recursively fill a cave downward:
Basic Recursive Fill
;fillr stone 20 Limit the depth:
Limited Recursive Fill
;fillr stone 20 8 down Fill a horizontal cavity:
Horizontal Recursive Fill
;fillr glass 25 15 east Use a mixed pattern:
Mixed Recursive Fill
;fillr 70%stone,20%andesite,10%gravel 30 20 down Use a radial gradient:
Gradient Recursive Fill
;fillr $cave.rad 30 20 down Like ;fill, ;fillr:
- Does not use a selection
- Modifies only connected air
- Does not accept a direct mask
- Does not use the global mask in the current implementation
;fill Compared with ;fillr
| Behavior | ;fill | ;fillr |
|---|---|---|
| Uses a selection | No | No |
| Starts from the placement position | Yes | Yes |
| Modifies only connected air | Yes | Yes |
| Expands sideways recursively | No | Yes |
| Best for wells or ponds | Yes | Sometimes |
| Best for irregular caves | Limited | Yes |
| Default depth | 1 | Same as radius |
| Default direction | down | down |
Use ;fill when the cavity follows a mostly direct path. Use ;fillr when the empty space branches or changes width.
Common Mistakes
Using ;fill for a Selection
fill does not use selection boundaries.
Use this for a complete selection:
Fill a Complete Selection
;set stone Use this for connected air near the placement position:
Fill Connected Air
;fill stone 20 10 down Expecting ;fill or ;fillr to Replace Solid Blocks
Both commands have a fixed destination filter: connected air only.
To fill matching blocks inside a selection, use ;replace.
Using ;walls When a Floor and Ceiling Are Needed
Use ;walls for lateral sides only. Use ;faces for the complete exterior.
Using ;faces Instead of ;hollow
faces creates or replaces the exterior boundary. hollow removes or replaces the interior while preserving a shell.
Expecting ;set to Respect the Global Mask
In the current latest implementation, use ;replace <mask> <pattern> for a restricted selection fill.
Quick Reference
Selection Fill Commands
;set <pattern>
;replace <mask> <pattern>
;walls <pattern> [mask]
;faces <pattern> [mask]
;hollow [thickness] [pattern]
;overlay <pattern> [depth] [surfaceMask] Connected Fill Commands
;fill <pattern> <radius> [depth] [direction]
;fillr <pattern> <radius> [depth] [direction]