Step 8: WorldEdit
With great power, comes a great number of commands
WorldEdit is the most powerful tool available to select large areas in minecraft, and then alter them in many many ways. Mods also use it for selecting areas that they will apply special permissions too, as we'll learn about in WorldGuard. The world edit mod itself doesn't require any setup, you put it in your plugins folder and then start your server, then any player with OP or with appropriate permissions can summon the WorldEdit tool by typing the following command "//wand" and receive a special wooden axe. Make note that world edit uses double "/" for all of its commands and so far is the only mod I know that does that. We're going to do a very brief overview of WorldEdit so that you're able to build simple structures, and ready to use it with WorldGuard.
Selecting an area
How to select an Area using the axe, how to change selection from //sel cuboid to //sel sphere or //sel cyl
Lets start by getting the selection tool, after connecting to the server type in the command "//wand" and hit enter. You should now have a wooden axe, select it as your active tool. The selection tool works by setting Postion 1 by clicking on the Left mouse button, and Postion 2 by clicking the Right mouse button. Go ahead and left click on a block to set our first position. You'll notice after clicking it tells you that you which position was set, and the X, Y, Z coordinates of the selection.
Now lets use the Right mouse button and set position two and see what happens. You'll see that the message now says position 2, the X, Y, Z coordinates, and then a number. The number at the end is telling you the total number of blocks you currently have selected. Go ahead and click around to expand your selection, and try and change your elevation to see how the number changes. You'll notice that WorldEdit includes even empty blocks in your selection areas, because even an empty block is technically a block of Air in the game, this is important to remember when you want to clear an area as you'll set the area to the block ID of air.
World edit by default selects area's as cubes, but you can also set it to select areas in the shapes of Sphere's and Cylinders. You can change the selection style by entering in the following commands:
//sel cuboid
//sel sphere
//sel cyl
You can not change the selection method and keep you're current selection, so keep that in mind if you're working on something.
The selection method for Sphere is pretty straight forward as it will tell you, Left button sets Center of the sphere, Right button now sets the Radius of the sphere. Cylinder is a little more complicated, as Left button sets the Center, but you must now click the Right button in two locations to set the two seperate Radius points in the X and Z directions, this lets you make shapes like ellipses. Spend some time to explore the different shape selection tools as they will really help you create interesting buildings quickly and give your world a unique look.
Lets start by getting the selection tool, after connecting to the server type in the command "//wand" and hit enter. You should now have a wooden axe, select it as your active tool. The selection tool works by setting Postion 1 by clicking on the Left mouse button, and Postion 2 by clicking the Right mouse button. Go ahead and left click on a block to set our first position. You'll notice after clicking it tells you that you which position was set, and the X, Y, Z coordinates of the selection.
Now lets use the Right mouse button and set position two and see what happens. You'll see that the message now says position 2, the X, Y, Z coordinates, and then a number. The number at the end is telling you the total number of blocks you currently have selected. Go ahead and click around to expand your selection, and try and change your elevation to see how the number changes. You'll notice that WorldEdit includes even empty blocks in your selection areas, because even an empty block is technically a block of Air in the game, this is important to remember when you want to clear an area as you'll set the area to the block ID of air.
World edit by default selects area's as cubes, but you can also set it to select areas in the shapes of Sphere's and Cylinders. You can change the selection style by entering in the following commands:
//sel cuboid
//sel sphere
//sel cyl
You can not change the selection method and keep you're current selection, so keep that in mind if you're working on something.
The selection method for Sphere is pretty straight forward as it will tell you, Left button sets Center of the sphere, Right button now sets the Radius of the sphere. Cylinder is a little more complicated, as Left button sets the Center, but you must now click the Right button in two locations to set the two seperate Radius points in the X and Z directions, this lets you make shapes like ellipses. Spend some time to explore the different shape selection tools as they will really help you create interesting buildings quickly and give your world a unique look.
Using the //Set command
Now that we have selecting an area down, lets learn how we can interact with that area. The "//set" command is the main way you'll be interacting with large area's that you select. It follows a pattern of "//set <block name>" or "//set <block id>" to pick the block that will fill in the area you have selected. You'll find that block names are not always easy to figure out, and that opening a web page to a block ID listing is the better way to get the exact block you're trying to place, especially for anything that have multiple types or colors like Wool or Wood. I tend to use this page to find the block ID's I need.
The one other thing the //set command can do, is randomly cover the select area with multiple types of blocks. This is good for making things look a bit more natural like mixing in some moss and cracked stone blocks with a majority of normal stone blocks. You do this by typing the command like this: "//set (%)<blockid>,(%)<blockid>" . You can have as many blockid's as will fit in the command line, but the % values MUST add up to 100% or the command will fail. As an example here is how you would make an area of stone brick with some moss and cracked blocks mixed in. "//set 75%98,15%98:1,10%98:2" Try putting that into an area and see what you get.
Now that looks really messy but if you look up the ID's for Stone Brick, you'll see that the extra forms of it aren't given their own seperate ID numbers but instead a Data Value number. Stone brick is 98, but mossy stone is 98:1, and cracked stone is 98:2. You'll also notice that for the given name in Minecraft if you were to use <blockname> instead of the ID, all of them share the same name, so it would be impossible to get the right blocks for this command.
The one other thing the //set command can do, is randomly cover the select area with multiple types of blocks. This is good for making things look a bit more natural like mixing in some moss and cracked stone blocks with a majority of normal stone blocks. You do this by typing the command like this: "//set (%)<blockid>,(%)<blockid>" . You can have as many blockid's as will fit in the command line, but the % values MUST add up to 100% or the command will fail. As an example here is how you would make an area of stone brick with some moss and cracked blocks mixed in. "//set 75%98,15%98:1,10%98:2" Try putting that into an area and see what you get.
Now that looks really messy but if you look up the ID's for Stone Brick, you'll see that the extra forms of it aren't given their own seperate ID numbers but instead a Data Value number. Stone brick is 98, but mossy stone is 98:1, and cracked stone is 98:2. You'll also notice that for the given name in Minecraft if you were to use <blockname> instead of the ID, all of them share the same name, so it would be impossible to get the right blocks for this command.
Changing the area selected
How to change the area selected by using the //expand, //inset, and //shift and //hollow commands.
The next part of WorldEdit is how to change the shape of your selection area from the command line. This might sound silly because you could just click on the new positions to have a new selection area, but as you'll see in the examples below this isn't quite feasible or would take you hours of time to do it the manual way.
The first command we'll learn is the Expand command, this command lets us grow the size of the selected area in a specific direction for as large as we want. It works by selecting an area, and then typing "//expand (direction) (how many blocks to grow)". The directions available are N, S, E, W, U, and D which are for North, South, East, West, Up, and Down. This can be confusing when using the N,S,E,W as you'll need to hit the F3 button to see currect direction your looking, or have a compass in your hand. Thankfully theres generally only one reason I use this command, and its to make it so my selection goes from the bottom of the map all the way to the top of the sky. This is how I protect regions with world guard from other players who might try and cover up an area you've worked on or tunnel under. The command to expand your selection from the bottom of the map to the top is simply "//expand vert".
The second command is Inset, and is used to shrink your selection area. You can use this to set hidden things inside your structures, or to hollow out areas. The basic way to hollow something out is to select the area and then use the command "//inset 1" and it will shrink your selection in all directions by 1 block. Follow that up with "//set air" and you'll have hollowed out your selection.
The last command is Shift, and is useful when you want to make multiples of the same selection in a pattern, such as every 5 blocks to the west. Simply type the command "//shift 5 W" and you're selection will move 5 blocks to the west. Remember that if your selection is larger than 5 blocks, you'll still be inside of it, so experiment with it a bit to get the hang of this and the other selection modification commands.
The next part of WorldEdit is how to change the shape of your selection area from the command line. This might sound silly because you could just click on the new positions to have a new selection area, but as you'll see in the examples below this isn't quite feasible or would take you hours of time to do it the manual way.
The first command we'll learn is the Expand command, this command lets us grow the size of the selected area in a specific direction for as large as we want. It works by selecting an area, and then typing "//expand (direction) (how many blocks to grow)". The directions available are N, S, E, W, U, and D which are for North, South, East, West, Up, and Down. This can be confusing when using the N,S,E,W as you'll need to hit the F3 button to see currect direction your looking, or have a compass in your hand. Thankfully theres generally only one reason I use this command, and its to make it so my selection goes from the bottom of the map all the way to the top of the sky. This is how I protect regions with world guard from other players who might try and cover up an area you've worked on or tunnel under. The command to expand your selection from the bottom of the map to the top is simply "//expand vert".
The second command is Inset, and is used to shrink your selection area. You can use this to set hidden things inside your structures, or to hollow out areas. The basic way to hollow something out is to select the area and then use the command "//inset 1" and it will shrink your selection in all directions by 1 block. Follow that up with "//set air" and you'll have hollowed out your selection.
The last command is Shift, and is useful when you want to make multiples of the same selection in a pattern, such as every 5 blocks to the west. Simply type the command "//shift 5 W" and you're selection will move 5 blocks to the west. Remember that if your selection is larger than 5 blocks, you'll still be inside of it, so experiment with it a bit to get the hang of this and the other selection modification commands.
Creating Shapes
How to use //pyramid, //cyl, and //sphere and their hollow versions //hpyramid, hcyl, and //hsphere. //walls too
The last part of of WorldEdit that I'll cover here is how to make basic shapes. These commands don't need any selection area, instead they will also center on the block that is at your feet. So just stand where you want the shape and then issue the command. These commands also have identical commands that create Hollow version of the shape, simply add an "h" after the "//" of the command.
Lets start with a pyramid, you can use the command "//pyramid <blockid> <radius of pyramid>". So if we issue the command "//pyramid 98 5" we will get a pyramid made out of stone brick that is five blocks from the center to each side and 5 blocks up. Try the command "//hpyramid 98 10" and see how large the hollowed out pyramid is.
Next lets look at the Sphere command, its pretty much identical, only now it will go in all directions around you and be more rounded in shape. Again, you can also use the "//hsphere 98 5" command to create a hollowed out sphere of stone brick that has a 5 block radius from your feet.
The Cylinder command is the more complicated of the shapes, as we can give it two separate Radius's and make elliptical like shapes. If you only give it a single radius, then it will make a simple circle like cylinder. Use the command: "//hcyl 98 10 5" to make a stone brick wall around you that has a 10 block radius and is 5 blocks high. To make an elliptical shape, lets give it two radius's as follows: "//hcyl 98 7,4 5" This will give us an ellipitcal shape with a radius of 7 going East to West, and a radius of 4 going North to South, and is again 5 blocks high.
Go ahead and experiment with things, make a simple building only using the shapes and see what you can come up with.
The last part of of WorldEdit that I'll cover here is how to make basic shapes. These commands don't need any selection area, instead they will also center on the block that is at your feet. So just stand where you want the shape and then issue the command. These commands also have identical commands that create Hollow version of the shape, simply add an "h" after the "//" of the command.
Lets start with a pyramid, you can use the command "//pyramid <blockid> <radius of pyramid>". So if we issue the command "//pyramid 98 5" we will get a pyramid made out of stone brick that is five blocks from the center to each side and 5 blocks up. Try the command "//hpyramid 98 10" and see how large the hollowed out pyramid is.
Next lets look at the Sphere command, its pretty much identical, only now it will go in all directions around you and be more rounded in shape. Again, you can also use the "//hsphere 98 5" command to create a hollowed out sphere of stone brick that has a 5 block radius from your feet.
The Cylinder command is the more complicated of the shapes, as we can give it two separate Radius's and make elliptical like shapes. If you only give it a single radius, then it will make a simple circle like cylinder. Use the command: "//hcyl 98 10 5" to make a stone brick wall around you that has a 10 block radius and is 5 blocks high. To make an elliptical shape, lets give it two radius's as follows: "//hcyl 98 7,4 5" This will give us an ellipitcal shape with a radius of 7 going East to West, and a radius of 4 going North to South, and is again 5 blocks high.
Go ahead and experiment with things, make a simple building only using the shapes and see what you can come up with.