Once you have selected a region, it's time for the real fun to begin.
- 1 Setting blocks
- 2 Replacing blocks
- 3 Building walls
- 4 Overlaying
- 5 Stacking
- 6 Moving
- 7 Smoothing
- 8 Regenerating
- 9 Naturalizing
- 10 Placing flora
- 11 Deforming regions
- 12 Hollowing areas
- 13 Creating lines and curves
- 14 Setting a block in the center
- //set <block-type>
A list of block types can be found on the Minecraft wiki.
|Setting the area to glass: //set glass|
|Removing blocks in the area: //set 0|
It is possible to paste more complex patterns of blocks than just a single block. For example, you can set an area to a percentage of various different blocks.
|Setting Percentages in the area: //set 25%stone,50%ironore,25%coalore|
Remember to include the , or it wont work.
Note that if you plan to fill an area, //replace and especially //fill work better (to be explained).
The percentage syntax described here is only one of many other supported ones. See the block patterns page for examples of other complex patterns available to you.
- //replace <list-of-blocks-to-replace> <block-to-replace-with>
While setting blocks is useful, sometimes you want to replace existing blocks based on some criteria. WorldEdit can replace blocks in three ways:
- Replace all occupied blocks (non-air blocks) with another type of block
- Replace all blocks of a certain type with another type of block
- Replace all blocks of a list with another type of block
The //replace command does all three, as we will see.
|Replacing all non-air blocks with grass: //replace grass|
If you want to pick which blocks to replace, put it before the last parameter.
|Replacing all smooth stone blocks with cloth: //replace stone cloth|
Now, if you want to replace a list of blocks, you simply put commas between the blocks.
|Replacing both dirt and grass blocks with diamond ore: //replace grass,dirt diamondore|
Try it yourself! Remember that you can also replace air blocks, allowing you to fill an area (although there is another command for that, to be explained later).
|Replacing air with redstone ore: //replace 0 redstoneore|
Note that "0" was used for air, but you can also type in "air" if you wish. You can use this command to fill an area by replacing air with water or lava, but the //fill command is better suited for such a task.
This command supports block patterns.
Sometimes you want to build the walls of your selection, including or excluding the ceiling. You have two commands at your disposal: //outline' and //walls.
Creating the walls of a cuboid
- //walls <block-type>
The //walls command creates walls only around the sides of the region you have selected while omitting the floor and ceiling.
- //overlay <block-type>
The //overlay command allows you to overlay blocks within the selection with another block. Only blocks at the top of the region will be overlaid; if your region includes a cave, it will not be affected unless it is open to the sky or your region doesn't stretch above the top of the cave. You could use this command to create snow, (although WorldEdit has a better command for that, that will take into account that snow doesn't belong on top of everything, like torches), and also to overlay fences or roads over an uneven area.
|Overlaying the region with grass: //overlay grass|
- //stack <count> [direction]
This command repeats your selected area's contents in the direction that you are looking.
- Extending bridges
- Making tunnels
- Repeating structures
|Stacking a region 50 times: //stack 50|
You can also explicitly specify a direction, such as "north," "up," or "down."
The stack command allows you to copy any blocks, regardless of WorldEdit's allowed blocks configuration option.
- //move <distance> [direction] [fillWith]
If you've built something, only to find out that you need to move it a little to the side, this command can be very helpful as it will shift the entire area like magic. The command takes a distance to move the area, an optional direction, and also a block to fill with the existing area now left void by the move. The direction parameter works like that of the //stack commands: you can use a cardinal direction (north, south, west, east), "up", "down", or "me" to use the direction that you are looking in. You don't have to provide a direction as "me" will be used by default.
|Moving the selection 2 blocks upwards: //move 2 up|
By default, if you don't provide a block to fill with, the area left behind will be just air. You can use something else if you wish.
|Moving the selection 2 blocks in the direction that you are looking at, leaving smooth stone: //move 2 me stone|
|Moving the selection 2 blocks downwards, copying air: //move 2 down|
If you want to move an object around and don't want to redefine it each time then you can use //move -s amount direction
|Moving the selection 2 blocks downwards, copying air: //move -s 2 down|
Copying is subject to WorldEdit's special block support. Be very aware of this because there is no way back — undoing is subject to the same rules.
- //smooth [iterations]
If you need to smooth a rough formation (such as some rough mountains), this command will do it. Make sure you first select an area that covers the entire region and then use the command. An iteration count can be specified, allow you to run the smooth algorithm can several times in succession to result in a smoother surface.
This command will regenerate the area within your selection to its state when the world was freshly generated. It will use your world's seed so regenerating multiple times will always generate the same terrain.
This command will naturalize a region by changing stone, dirt, and grass in the selection to consist of one top layer of grass, three layers of dirt below that, and all stone below that. This is useful to make an area "look natural" once again without too much work.
This command will scatter tall grass and flowers on grass and cacti on sand in your selection.
- //deform <expression>
Applies a user-defined transformation to a region:
- Turning your beloved cathedral into a Dali piece
- Whatever else you can imagine
- -r Use raw coordinates, as they appear on the debug screen (F3)
- -o Use raw coordinate offsets with (0,0,0) at your position/pos1, depending on your settings
- with neither of these flags, coordinates will be normalized to -1..1
- x, y, z (input/output) - Coordinates
|Making the terrain bumpy: //deform y+=0.2*sin(x*10)|
This command uses the expression parser.
Using //hollow [thickness] [fill pattern] command will hollow out objects in your selection, leaving a shell with the given thickness. By default, the interior of the hollowed object will be filled with air, unless you specify something else.
Creating lines and curves
When you have a cuboid region selected, you can draw a line between the first and second points you selected. The command //line <pattern> [thickness] will create a line of the given pattern and thickness, and adding the -h flag will make it hollow, allowing you to generate a “tube”.
To make a curve with more points, use the //sel convex selection mode to select multiple points. Then use //curve <pattern> [thickness] to draw a spline through all the points selected (in order!) of the given pattern and thickness - again, -h will make it hollow.
Setting a block in the center
The //center <pattern> command will set the center block (or 2 blocks, along any axis of even length) of your selection.