Sometimes you may want to generate forests or create spheres automatically, as doing it by hand may be too tedious. WorldEdit has a number of tools that allow you to do just that. These commands don't need a region; they use the block that you are standing in.
Cylinders and circles
//cyl <block> <radius> [height]
//hcyl <block> <radius> [height]
WorldEdit is capable of producing both hollow and filled cylinders as well as hollow and filled circles. It uses a fast algorithm to generate the objects and the algorithm is capable of creating nice and symmetrical edges. The cylinders are created at your feet and extend upwards. If you are creating a circle, you simply only need to create a cylinder of height 1.
//cyl glass 5 10
//hcyl glass 5 1
Elliptical cylinders and ellipses
//cyl <block> <radiusEW>,<radiusNS> [height]
//hcyl <block> <radiusEW>,<radiusNS> [height]
By specifying 2 radii, separated by a comma, you can generate elliptical cylinders.
The first radius is east/west, the second radius is north/south.
//sphere <block> <radius> [raised?]
//hsphere <block> <radius> [raised?]
Both hollow and filled spheres can be created. By default, the center of the sphere will be the block above the one that you are standing on, but if you provide "yes" for the last parameter, the sphere will be raised by its radius so that its bottom is at your feet instead.
//sphere glass 4
//sphere glass 4 yes
//sphere <block> <radius>,<radius>,<radius> [raised?]
//hsphere <block> <radius>,<radius>,<radius> [raised?]
The order of the ellipsoid radii is north/south, up/down, east/west. When making ellipsoids, all three radii must be specified.
//pyramid <block> <size>
//hpyramid <block> <size>
Creates a hollow or filled pyramid with the specified block pattern and size.
//hpyramid glass 5
/forestgen <size> [type] [density]
Forests can be generated with this command. The size parameter indicates the width and height of the square area to generate the forests in. The density can vary between 0 and 100, and numbers like 0.1 will work. Be aware that it is not possible to get 100% density (a tree in every spot) as Notch's tree algorithm won't permit that, and the default density of 5% already generates a very thick forest. Lastly, the command searches the area around you, controlled by the size parameter, and it will descend in elevation a bit in order to find grass or dirt (trees will only be generated on top of those two blocks), but it will not ever go up above your feet. Thus, you will have to stand on a raised platform sometimes in order to fill an entire area. See the list of tree types. that you can use.
/forestgen 10 tree 0.5
WorldEdit can generate pumpkin patches that even contain leaves (Notch's pumpkin patches do not contain leaves). The size parameter is the width and height of the square area to generate the patches within, radiating out from your feet. The density of the patches is currently not adjustable.
[[|center|thumb|300px|Example of some pumpkin patches.]]
//g[en[erate]] <block> <expression>
Since v5.0 Generates any shape that can be described with a mathematical formula:
- A torus
- Rotated cylinders
- Jagged canyons
- Any shape you can imagine and boil down into a formula
- -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
- -h Generate a hollow shape. Blocks will only be set if they neighbour any blocks that are not part of the shape.
- x, y, z (input) - Coordinates
- type, data (input/output) - Material to use, defaults to the block/pattern entered
Return value (numeric boolean): true (> 0) - This block is part of the shape false (<= 0) - This block is not part of the shape The expression parser's logical and comparison operators all return 0 (false) or 1 (true), so you can just specify an equation with
//g stone (0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2
//g -h log (0.5+sin(atan2(x,z)*8)*0.2)*(sqrt(x*x+z*z)/0.5)^(-2)-1.2 < y
//g wool data=(32+15/2/pi*atan2(x,y))%16; (0.75-sqrt(x^2+y^2))^2+z^2 < 0.25^2
//g wool data=(32+y*16+1)%16; y^2/9+x^2/6*(1/(1-0.4*y))+z^2/6*(1/(1-0.4*y))<0.08
//g wool:red (z/2)^2+x^2+(5*y/4-sqrt(abs(x)))^2<0.6
//g -h glass sin(x*5)/2<y
//g -h glass cos(sqrt(x^2+z^2)*5)/2<y
//g stone -(z^2/12)+(y^2/4)-(x^2/12)>-0.03
This command uses the expression parser.