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

BeastNode

WorldEdit/Clipboard

From EngineHub.org Wiki
< WorldEdit
Revision as of 14:47, 7 April 2012 by Zml2008 (Talk | contribs)

Jump to: navigation, search

WorldEdit has a powerful clipboard function that allows you to copy an area, paste it, and even save it to and load it from files. Clipboard contents are currently only cuboids and copying use the region you have selected.

Contents

Copying and cutting

  • //copy
  • //cut [leaveBlock]

This simple command copies your current selection to your session's clipboard, keeping track of where you are relative to the copy. The second part of that sentence is very important; if you want to later paste, for example, a bridge so that is under where you are standing, you must stand above the bridge when you make the copy. This method allows you to easily align your later paste because you can plan ahead a bit; it requires some spatial abilities to master the copying process but you will find it particularly helpful when you get the hang of it.

//cut works just like //copy command except that it also deletes the area afterwards. By default it will leave air blocks but you can also specify a different block.

Warning: This remembers your current position relative to the copy. This is a very important concept to grasp otherwise you will not be able to control where you paste your copy!

Pasting

  • //paste [-ao]

'

Once you have something in your clipboard, you can paste it to world. The last argument is optional: if you want the copy to paste at the same point that it was copied at, type //paste -o, otherwise the paste will be placed relative to you. Remember that if you are pasting relatively, it will be relative to where you were when you made the initial copy. For example, if you were on top of your castle when you copied it, pasting it would result in the castle being pasted under you.

WorldEdit paste.png

Let's say you want to copy a wall and place it somewhere else. If you just stand a couple of blocks away, copy it, and then try to paste it, there is a certain chance that you will be off one block in any direction (except up and down maybe) due to the way minecraft records your location. As a help to make sure that copy/paste is exact on the block where you want it, do the following: Mark the wall. Place any block 3 blocks away from the center of your wall before copying. Walk towards the block as far as possible. Copy. Place another block 3 blocks away form the location where you want the center of the pasted wall to be. Walk against that block. Paste. Remember that it does not matter which direction you look. If you want the wall to face into another direction, rotate it and then do the same placing of a block that you walk into.

You can use //paste -a to paste everything but air.

Rotating

  • //rotate <angleInDegrees>

Sometimes you may want to rotate your copy. This command currently lets you rotate your copy around the Y (up-down) axis 90 degrees or at any multiple of 90 degrees. To be accurate, it actually allows you to revolve your copy around the relative offset that you were at when you originally made the copy. If you wanted to rotate a copy around its center, you would have had to stand in the middle of the copy when you had made it.

WorldEdit rotate.png

Flipping

  • //flip [-p] [direction]

Flips the current clipboard in a specified direction. The directions available are North, South, East, West, up, and down; North, South, East, and West can be specified by looking in those directions, whereas up and down cannot. The clipboard flips about a plane perpendicular to the direction specified, through the center of the clipboard (not about the player). There are three planes, one horizontal (xz), and two vertical (xy, yz). The horizontal plane xz is defined through the up or down vectors, the xy plane defined by East/West, and the yz plane by North/South.

WorldEdit flip2.png

The -p flag flips the selection around the player, instead of the selections center.

Loading and saving

WorldEdit can work with .schematic files when saving copies or loading them. The advantage of .schematic files is that they are compatible with a number of other programs like MCEdit, NBTedit, and the Redstone Simulator. The format also supports all of Minecraft's block data and it is documented so that you can implement it in your own programs.

  • //<schematic|schem> <save|load> <format> <filename>

The available formats are mcedit and mce. All .schematic files saved before build #1134-c76f119 (or WorldEdit 5.3)'s format is mcedit.

Both the origin of the copy and your offset to the copy are saved with the file so that you can load it back later on and paste the copy at its original location or relative to you as if you had copied it. You should be familiar with how //copy and //paste store your relative position.

Save storage

Files are saved and loaded to the \plugins\WorldEdit\schematics\ folder of your Minecraft server. WorldEdit restricts loading and saving to this folder for reasons of security. Filenames have .schematic appended as an extension automatically. Directories are supported and new subfolders will be created as needed. It is currently not possible to change the folder.

Both commands check the path of the schematic name to see if it is a valid name. Paths can only contain alphanumeric characters and the combination of some allowed characters. The regular expression used to check is ^[A-Za-z0-9_\ \./\\'\$@~!%\^\*\(\)\[\]\+\{\},\?]+$. If the path longer than the underlying system supports, Java will complain with an error and the user will be informed.

Warning: Each user doesn't have their own folder yet.

Clearing the clipboard

  • /clearclipboard

Clearing your clipboard discards its contents, saving a little bit of memory.



Namespaces

Variants
Actions