Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

About the ads

WorldEdit/Utilities

From SK's Wiki
Jump to: navigation, search

WorldEdit provides many useful utilities, especially if you like to "terraform."

All these commands use the position that you are standing at. You can toggle it to use your first selection position by using the /toggleplace command.

Contents

Filling pits

An irregularly shaped pool filled with //fill. You wouldn't have been able to replace air with water (with /replace) in this situation because the area doesn't fit neatly into a cuboid.
  • //fill <block> <radius> [depth]

You can fill depressions in the land with this command, letting you make water or lava pools instantly without having to manually place a ton of water source blocks. Simply stand in the hole that you want to fill and specify a radius and optionally a depth (the default depth is just 1). The way fill works is that it puts blocks where the sun would hit, assuming that the sun was directly overhead: it will fill only the parts of the hole that are not "covered." Therefore you can't fill caves with this command because the cave will soon extend underground. (There's //fillr though.)

If you are curious, a discussion of the algorithm used follows. The algorithm is as follows:

  1. A: If the block is an air block:
    1. Set the block to the target block.
    2. Fill air blocks below with the target block up to depth - 1 blocks.
    3. For each block of the four on the sides:
      1. Repeat A for each block that is within the radius.

While //fill uses the block that you are standing in (the block above the one you are standing on) to start, you can switch it to use your first selection position by using /toggleplace. If you use the wand to select the position, be aware that because it selects an occupied block, the fill command will do nothing (see step one in the algorithm above)

This command supports block patterns.

Recursive fill

  • //fillr <block> <radius>

A limitation of the fill command, as outlined previously, was that it would not fill any column that was not exposed to such an imaginary sun. That can be a problem if you want to fill a cave or fill a hole with smaller holes on the side. //fillr is different; it will fill every block next to the original block, allowing it to work to fill caves and such. However, this command will never ascend above your feet (or the first selection position) so you still have to stand at the top of the hole, one block inset.

This command supports block patterns.

Draining pools

  • //drain <radius>

If you've ever wanted to get rid of water or lava by hand, you know how painstaking it can be. WorldEdit can do it for you, removing all connected water or lava within a pool without "jumping" to disconnected pools. While you can replicate this command with //replace using water or lava, the pool would have to perfectly fit inside a cuboid.

You must be standing on the shore of the pool on the same elevation or in the body of liquid itself. You cannot be one block higher than the pool or more than one block away.

The algorithm is simple:

  1. For every nearby block within 1 block of the initial position:
    1. A: If the block is water or lava:
      1. Remove the block.
      2. For every block adjacent, including diagonally adjacent blocks and blocks above and below, repeat A for those blocks if they are not farther than the radius away.

While //drain uses the block that you are standing in (the block above the one you are standing on) as the initial block to search from, you can switch it to use your first selection position by using /toggleplace.

Fixing pools

  • /fixwater <radius>
  • /fixlava <radius>

Making a calm pool of water or lava manually is quite challenging for a one block deep pool and is nearly impossible for deeper pools, but these two commands are intended to solve that problem. They find nearby water or lava blocks and fan out across the liquid to fill the entire area and replace flowing water/lava blocks with their stationary equivalents. You simply need to stand on the shore of the water or lava (not one level above) and use the commands. Be aware that if you attempt to do this on top of a waterfall, the water will be spread out into a giant liquid umbrella as these two commands also expand the spread of the water or lava! If you attempt to use the commands while you are a few blocks deep in the pool, the water will be fixed only on that level and not the levels above.

A lake that /fixwater was used on.

While the two commands use the block that you are standing in (the block above the one you are standing on) as the initial block to search from, you can switch it to use your first selection position by using /toggleplace.

Editing nearby blocks

WorldEdit also provides many commands for editing blocks in the area around you.

Removing blocks above and below

  • /removeabove <size> [height]
  • /removebelow <size> [depth]

These two commands let you easily remove blocks above or below you. An example usage is to remove those tower blocks people create in order to get to a high point. The size parameter indicates the size of the cuboid to remove. The cuboid's width and length will be (size - 1) * 2 + 1. The center of the cuboid is the block above the one that you are standing on. If you don't specify a height or depth, the commands will extend to the extents of the world.

While this command uses the block that you are standing in (the block above the one you are standing on) as the cuboid center, you can switch it to use your first selection position by using /toggleplace.

Removing nearby blocks

  • /removenear <block> <size>

This command removes nearby blocks of a certain type. The size parameter indicates the size of the cuboid to remove. The cuboid's width and length will be (size - 1) * 2 + 1. The center of the cuboid is the block above the one that you are standing on.

While this command uses the block that you are standing in (the block above the one you are standing on) as the cuboid center, you can switch it to use your first selection position by using /toggleplace.

Replacing nearby blocks

  • /replacenear <size> <replace-type> <replace-with>

If you need to quickly replace nearby blocks, this command is a nice shortcut. The size parameter indicates the size of the cuboid to replace. The cuboid's width and length will be (size - 1) * 2 + 1. The center of the cuboid is the block above the one that you are standing on.

While this command uses the block that you are standing in (the block above the one you are standing on) as the cuboid center, you can switch it to use your first selection position by using /toggleplace.

Simulating snowfall

  • /snow <radius>

Cover snow over the general area! This algorithm will only cover blocks with snow if they should be covered (for example, torch blocks will not be covered). If an area has something above it (like an overhang), snow will not reach it. "Snowfall" is completely vertical.

Snowed area.

While this command uses the block that you are standing in (the block above the one you are standing on) as the cuboid center, you can switch it to use your first selection position by using /toggleplace.

Simulating grass growth

  • /green <radius>

Cover grass over the general area! This algorithm will only cover blocks with grass if they should be covered (for example, torch blocks will not be covered). If an area has something above it (like an overhang), /green will not reach it. /green is completely horizontal.

While this command uses the block that you are standing in (the block above the one you are standing on) as the cuboid center, you can switch it to use your first selection position by using /toggleplace.

Thawing areas

  • /thaw <radius>

If you need to thaw an area (and perhaps reverse the use of /snow), this command does the exact opposite of snowfall. For all sun-exposed blocks, if it is a snow cover block, it will be removed, and if it's ice, it will be changed to water. This is different from using /replacenear to "thaw" because using /replacenear would destroy indoor ice and snow blocks.

Removing mobs

  • /butcher <radius>

This command kills nearby mobs and monsters included. If you don't specify a radius, all active mobs in the entire loaded world will be killed. The mobs will not drop their loot. Be aware that even if you kill all mobs, they will come back quickly.

Flags:

  • -a - Kill friendly animals
  • -n - Kill NPCs (such as villagers)
  • -p - Kill pets (such as tamed wolves)

Since v5.5

  • -b Kill ambient mobs (currently only bats)

Extinguishing fires

  • /ex [radius]

This command is a shortcut for /removenear fire <radius>. By default, a radius of 40 is used unless you specify a radius. Note that this won't remove lava so lava can start a fire again if it's near something flammable.



Namespaces

Variants
Actions