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
Line 48: Line 48:
  
 
Note that special block types like chests and signs can be loaded or saved successfully depending on [[WorldEdit/Features#Block data support|block data support]] in WorldEdit.
 
Note that special block types like chests and signs can be loaded or saved successfully depending on [[WorldEdit/Features#Block data support|block data support]] in WorldEdit.
 +
 +
{{Warning|text=Each user's save is not written to a folder for each user and users can replace each other's saves (by accident or not).}}
  
 
== Clearing the clipboard ==
 
== Clearing the clipboard ==

Revision as of 14:47, 17 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
  • //cut [leaveBlock]

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.

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

Pasting

  • //paste [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. 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

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

WorldEdit rotate.png

Flipping

  • //flip [direction]

Flips the copy in a direction. If you don't specify a direction, you can simply look in the direction that you want (except up or down). However, you can also specify "north," "south," "west," "east," "up," or "down" explicitly. Note that this command revolves the blocks around an axis but it does not actually 'rotate' orientation-aware blocks such as stairs (yet).

WorldEdit flip.png

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.

Note that special block types like chests and signs can be loaded or saved successfully depending on block data support in WorldEdit.

Warning: Each user's save is not written to a folder for each user and users can replace each other's saves (by accident or not).

Clearing the clipboard

  • /clearclipboard

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

Navigation menu