Difference between revisions of "WorldEdit/Generation"
(Created page with "<p>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 jus...") 
(No difference)

Revision as of 17:39, 18 September 2019
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.
Contents
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.
Example: Creating a filled glass cylinder of radius 5 and height 10 //cyl glass 5 10 
Example: Creating a hollow glass circle of radius 5 //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.
Spheres
 //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.
Example: Creating a 4 radius sphere of glass //sphere glass 4 
Example: Creating a raised 4 radius sphere of glass //sphere glass 4 yes 
Ellipsoids
 //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.
Pyramids
 //pyramid <block> <size>
 //hpyramid <block> <size>
Creates a hollow or filled pyramid with the specified block pattern and size.
Example: Creating a 5 high hollow pyramid out of glass with a side length of 10 //hpyramid glass 5 
Forests
 //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.
Warning: If you are using the single player version, be aware that these trees cannot be undone. 
Example: Generating forests in a 10 by 10 area /forestgen 10 
Example: Generating a 0.5% dense 10 by 10 forest /forestgen 10 tree 0.5 
Pumpkin patches
 /pumpkins [size]
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.
Example: Generating pumpkin patches in a 5 by 5 area /pumpkins 5 
[[centerthumb300pxExample of some pumpkin patches.]]
Arbitrary shapes
 //g[en[erate]] <block> <expression>
Generates any shape that can be described with a mathematical formula:
Flags:
Variables:
Return value (numeric boolean): 
Example: Torus of major radius 0.75 and minor radius 0.25 //g stone (0.75sqrt(x^2+y^2))^2+z^2 < 0.25^2 
Example: Gnarled hollow tree //g h log (0.5+sin(atan2(x,z)*8)*0.2)*(sqrt(x*x+z*z)/0.5)^(2)1.2 < y 
Example: Rainbow Torus //g wool data=(32+15/2/pi*atan2(x,y))%16; (0.75sqrt(x^2+y^2))^2+z^2 < 0.25^2 
Example: Rainbow Egg //g wool data=(32+y*16+1)%16; y^2/9+x^2/6*(1/(10.4*y))+z^2/6*(1/(10.4*y))<0.08 
Example: a heart //g wool:red (z/2)^2+x^2+(5*y/4sqrt(abs(x)))^2<0.6 
Example: Sine wave //g h glass sin(x*5)/2<y 
Example: Radial cosine wave //g h glass cos(sqrt(x^2+z^2)*5)/2<y 
Example: Circular Hyperboloid //g stone (z^2/12)+(y^2/4)(x^2/12)>0.03 
This command uses the expression parser.