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

BeastNode

Difference between revisions of "WorldEdit/Clipboard"

From EngineHub.org Wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
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.
 
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.
  
===Copying===
+
===Copying and Cutting===
  
 
  //copy
 
  //copy
Line 7: Line 7:
  
 
''Copying is subject to WorldEdit's special block support.''
 
''Copying is subject to WorldEdit's special block support.''
 
===Cutting===
 
  
 
  //cut [''leaveBlock'']
 
  //cut [''leaveBlock'']

Revision as of 11:45, 2 January 2011

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.

Copying and Cutting

//copy

This simple command copies your current selection to your session's clipboard, keeping track of where you are relative 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.

Copying is subject to WorldEdit's special block support.

//cut [leaveBlock]

This 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.

Pasting

//paste [atOrigin?]
//pasteair [atOrigin?]

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, put "true" or "yes", otherwise the paste will be placed relative to you. With the regular //paste command, air blocks will not be copied, meaning that existing blocks will not be removed to make room for empty areas. Use //pasteair if you want to copy air blocks.

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. Note that this command revolves the blocks around an axis but it does not actually 'rotate' orientation-aware blocks such as stairs (yet).

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.

//save <filename>
//load <filename>

Files are saved and loaded to the \schematics folder of your Minecraft server (or whatever the current working directory is when you start the 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 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.

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_\ \./\\'\[email protected]~!%\^\*\(\)\[\]\+\{\},\?]+$. If the path longer than the underlying system supports, Java will complain with an error and the user will be informed.

Clearing the Clipboard

/clearclipboard

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

Navigation menu