A fundamental part of WorldEdit is working with a selection or region. For example, if you wanted to replace all the glass blocks inside a square area with dirt, you would have to tell WorldEdit where this square is. WorldEdit gives you several ways to select a region for editing, this section will introduce you to selecting regions and show you what you can do with them.
- 1 Selecting cuboids
- 2 Adjusting the selection
- 3 Selection information
- 4 Selection modes
At the moment, WorldEdit allows you to select cuboids (think a 3D rectangle) by choosing two points at two corners of the cuboid. The diagram below indicates how two points can form a cuboid. The cuboids you select can only be aligned to the world (they cannot be rotated at an angle).
There are several different ways of choosing these two points and you can mix and match.
Selecting with the wand
The most intuitive way to select a region is by using wand. To get the wand, use
//wand (it is, by default, a wooden axe). Left clicking a block with the wand marks that block as the first corner of the cuboid you wish to select. A right-click chooses the second corner.
Selecting at your own location
These commands set the first and second corners to the block above the one that you are standing on. Generally the wand suffices for most tasks and you likely will not need to use this.
Selecting with your crosshair
These commands set the first and second corners to the block that you are looking at. This allows you to select points from far away and make particularly large cuboid regions with ease.
Selecting the current chunk
This command selects all the blocks in the chunk that you are standing in. Chunks are 16 by 16 and are 256 blocks high.
Adjusting the selection
Expanding the selection
//expand <amount> [direction]
//expand <amount> <reverse-amount> [direction]
This command allows you to easily enlarge a region in several different ways:
- By specifying a direction (north, south, west, east, up, or down)
- By looking in the direction (only for north, south, west, and east)
- To the sky and to bedrock
To specify a direction, use "N", "S", "W", "E", "U" (for up), or "D" (for down) for the direction. If you want to merely look in the direction, either use "me" for the direction or don't enter a direction parameter. You can specify two numbers and the region will be expanded in two directions simultaneously.
//expand vert if you want to expand the region between the sky and bedrock.
Contracting the selection
//contract <amount> [direction]
//contract <amount> <reverse-amount> [direction]
This command works similarly to //expand.
Shifting your selection
//shift <amount> [direction]
Shifts the region. This command works similarly to both //expand and //contract at the same time with the same amount in opposite directions. This will effectively shift the region by a certain amount. It will not move any blocks in the region; use the //move command to do that.
WorldEdit also provides you with commands for getting information about the area you have selected.
Getting selection size
Gets the number of blocks in that region. Air blocks will be counted.
Calculating a block's frequency
Counts the number of blocks of a specific type in the selection area.
Finding the block distribution
Shows the block distribution in the selection area.
# total blocks: 6 1 (16.667%) Stone #1 2 (33.333%) Cobblestone #4 3 (50.000%) Air #0
Cuboid selection mode
Left-click to select point #1. Right-click to select point #2. The selection will be a cuboid encompassing these 2 points.
Extending cuboid selection mode
Since v4.8-SNAPSHOT Left-click to select first point. All subsequent points are selected by right-clicking. Every right-click will extend the cuboid selection to encompass the new point.
Polygon selection mode
Left-click to select first point. All subsequent points are selected by right-clicking. Every right-click will add an additional point.
Ellipsoid selection mode
Sphere selection mode
Cylinder selection mode