]> git.lizzy.rs Git - worldedit.git/blobdiff - ChatCommands.md
Fix deserialization of schematics with node names table
[worldedit.git] / ChatCommands.md
index d3ed7db52d8997e6ab9aabcee2e2db594a3c0e7f..1d3b4e9bd1d54717e6347698ce6095fdcbbc7119 100644 (file)
@@ -17,32 +17,38 @@ Many commands also have shorter names that can be typed faster. For example, if
 | `//s`      | `//set`            |\r
 | `//r`      | `//replace`        |\r
 | `//ri`     | `//replaceinverse` |\r
+| `//hcube`  | `//hollowcube`     |\r
 | `//hspr`   | `//hollowsphere`   |\r
 | `//spr`    | `//sphere`         |\r
 | `//hdo`    | `//hollowdome`     |\r
 | `//do`     | `//dome`           |\r
 | `//hcyl`   | `//hollowcylinder` |\r
+| `//cyl`    | `//cylinder`       |\r
+| `//hpyr`   | `//hollowpyramid`  |\r
+| `//pyr`    | `//pyramid`        |\r
 \r
 ### `//about`\r
 \r
-Get information about the mod.\r
+Get information about the WorldEdit mod.\r
 \r
     //about\r
 \r
-### `//inspect on/off/1/0/true/false/yes/no/enable/disable/<blank>`\r
+### `//help [all/<cmd>]`\r
+\r
+Get help for WorldEdit commands. `all` shows all WorldEdit commands, `<cmd>`\r
+the help text for the given command.\r
+\r
+    //help\r
+    //help all\r
+    //help hollowpyramid\r
+\r
+\r
+### `//inspect [on/off/1/0/true/false/yes/no/enable/disable]`\r
 \r
 Enable or disable node inspection.\r
 \r
     //inspect on\r
     //inspect off\r
-    //inspect 1\r
-    //inspect 0\r
-    //inspect true\r
-    //inspect false\r
-    //inspect yes\r
-    //inspect no\r
-    //inspect enable\r
-    //inspect disable\r
     //inspect\r
 \r
 ### `//reset`\r
@@ -77,18 +83,19 @@ Set WorldEdit region position 2 to the player's location.
 \r
 ### `//p set/set1/set2/get`\r
 \r
-Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region.\r
+Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by\r
+punching nodes, or print the current WorldEdit region.\r
 \r
     //p set\r
     //p set1\r
     //p set2\r
     //p get\r
 \r
-### `//fixedpos set1 x y z`\r
+### `//fixedpos set1/set2 <x> <y> <z>`\r
 \r
-Set a WorldEdit region position to the position at (`<x>`, `<y>`, `<z>`).\r
+Set the WorldEdit region position 1 or 2 to the position (`<x>`, `<y>`, `<z>`).\r
 \r
-    //fixedpos set1 0  0 0\r
+    //fixedpos set1 0 0 0\r
     //fixedpos set1 -30 5 28\r
     //fixedpos set2 1004 -200 432\r
 \r
@@ -113,14 +120,23 @@ Set the current WorldEdit region to `<node>`.
     //set Blue Lightstone\r
     //set dirt with grass\r
 \r
-### `//mix <node1> ...`\r
+### `//param2 <param2>`\r
+\r
+Set the param2 value of all nodes in the current WorldEdit region to `<param2>`.\r
+\r
+    //param2 8\r
 \r
-Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
+### `//mix <node1> [count1] <node2> [count2] ...`\r
+\r
+Fill the current WorldEdit region with a random mix of `<node1>`, `<node2>`, `...`.\r
+Weightings can be optionally specified via the `[count1]`, `[count2]`, `...` parameters after a node name.\r
 \r
     //mix air\r
     //mix cactus stone glass sandstone\r
     //mix Bronze\r
     //mix default:cobble air\r
+    //mix stone 3 dirt 2\r
+    //mix cobblestone 8 stoneblock 2 stonebrick\r
 \r
 ### `//replace <search node> <replace node>`\r
 \r
@@ -140,6 +156,21 @@ Replace all nodes other than `<search node>` with `<replace node>` in the curren
     //replaceinverse dirt Bronze Block\r
     //replaceinverse mesecons:wire_00000000_off flowers:flower_tulip\r
 \r
+### `//hollowcube <width> <height> <length> <node>`\r
+\r
+Adds a hollow cube with its ground level centered at WorldEdit position 1 with\r
+dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
+\r
+    //hollowcube 6 5 6 Diamond Block\r
+\r
+### `//cube <width> <height> <length> <node>`\r
+\r
+Adds a cube with its ground level centered at WorldEdit position 1 with\r
+dimensions `<width>` x `<height>` x `<length>`, composed of `<node>`.\r
+\r
+    //cube 6 5 6 Diamond Block\r
+    //cube 7 2 1 default:cobble\r
+\r
 ### `//hollowsphere <radius> <node>`\r
 \r
 Add hollow sphere centered at WorldEdit position 1 with radius `<radius>`, composed of `<node>`.\r
@@ -172,27 +203,50 @@ Add dome centered at WorldEdit position 1 with radius `<radius>`, composed of `<
     //dome -12 glass\r
     //dome 17 mesecons:wire_00000000_off\r
 \r
-### `//hollowcylinder x/y/z/? <length> <radius> <node>`\r
+### `//hollowcylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
+\r
+Add hollow cylinder at WorldEdit position 1 along the given axis with length `<length>`,\r
+base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
 \r
-Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
+Despite its name this command allows you to create cones (`radius2` = 0) as well as any shapes inbetween (0 < `radius2` < `radius1`).\r
+Swapping `radius1` and `radius2` will create the same object but upside-down.\r
 \r
     //hollowcylinder x +5 8 Bronze Block\r
     //hollowcylinder y 28 10 glass\r
     //hollowcylinder z -12 3 mesecons:wire_00000000_off\r
     //hollowcylinder ? 2 4 default:stone\r
 \r
-### `//cylinder x/y/z/? <length> <radius> <node>`\r
+    //hollowcylinder y 10 10 0 walls:cobble\r
+    //hollowcylinder x 6 0 5 Dirt\r
+    //hollowcylinder z 20 10 20 default:desert_stone\r
 \r
-Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
+### `//cylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
+\r
+Add cylinder at WorldEdit position 1 along the given axis with length `<length>`,\r
+base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
+Can also create shapes other than cylinders, e.g. cones (see documentation above).\r
 \r
     //cylinder x +5 8 Bronze Block\r
     //cylinder y 28 10 glass\r
     //cylinder z -12 3 mesecons:wire_00000000_off\r
     //cylinder ? 2 4 default:stone\r
+\r
+    //cylinder y 10 10 0 walls:cobble\r
+    //cylinder x 6 0 5 Dirt\r
+    //cylinder z 20 10 20 default:desert_stone\r
     \r
-### `//pyramid x/y/z? <height> <node>`\r
+### `//hollowpyramid x/y/z/? <height> <node>`\r
+\r
+Add hollow pyramid centered at WorldEdit position 1 along the given axis with height `<height>` composed of `<node>`.\r
 \r
-Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
+    //hollowpyramid x 8 Diamond Block\r
+    //hollowpyramid y -5 glass\r
+    //hollowpyramid z 2 mesecons:wire_00000000_off\r
+    //hollowpyramid ? 12 mesecons:wire_00000000_off\r
+\r
+### `//pyramid x/y/z/? <height> <node>`\r
+\r
+Add pyramid centered at WorldEdit position 1 along the given axis with height `<height>` composed of `<node>`.\r
 \r
     //pyramid x 8 Diamond Block\r
     //pyramid y -5 glass\r
@@ -201,7 +255,8 @@ Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height
 \r
 ### `//spiral <length> <height> <spacer> <node>`\r
 \r
-Add spiral centered at WorldEdit position 1 with side length `<length>`, height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
+Add spiral centered at WorldEdit position 1 with side length `<length>`,\r
+height `<height>`, space between walls `<spacer>`, composed of `<node>`.\r
 \r
     //spiral 20 5 3 Diamond Block\r
     //spiral 5 2 1 glass\r
@@ -209,7 +264,7 @@ Add spiral centered at WorldEdit position 1 with side length `<length>`, height
 \r
 ### `//copy x/y/z/? <amount>`\r
 \r
-Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.\r
+Copy the current WorldEdit region along the given axis by `<amount>` nodes.\r
 \r
     //copy x 15\r
     //copy y -7\r
@@ -218,7 +273,7 @@ Copy the current WorldEdit region along the x/y/z/? axis by `<amount>` nodes.
 \r
 ### `//move x/y/z/? <amount>`\r
 \r
-Move the current WorldEdit positions and region along the x/y/z/? axis by `<amount>` nodes.\r
+Move the current WorldEdit positions and region along the given axis by `<amount>` nodes.\r
 \r
     //move x 15\r
     //move y -7\r
@@ -227,7 +282,7 @@ Move the current WorldEdit positions and region along the x/y/z/? axis by `<amou
 \r
 ### `//stack x/y/z/? <count>`\r
 \r
-Stack the current WorldEdit region along the x/y/z/? axis `<count>` times.\r
+Stack the current WorldEdit region along the given axis `<count>` times.\r
 \r
     //stack x 3\r
     //stack y -1\r
@@ -241,35 +296,34 @@ Stack the current WorldEdit region `<count>` times by offset `<x>`, `<y>`, `<z>`
     //stack2 5 3 8 2\r
     //stack2 1 -1 -1 -1\r
 \r
-### `//scale <factor>`\r
+### `//stretch <stretchx> <stretchy> <stretchz>`\r
 \r
-Scale the current WorldEdit positions and region by a factor of positive integer `<factor>` with position 1 as the origin.\r
+Scale the current WorldEdit positions and region by a factor of\r
+`<stretchx>`, `<stretchy>`, `<stretchz>` along the X, Y, and Z axes,\r
+respectively, with position 1 as the origin.\r
 \r
-    //scale 2\r
-    //scale 1\r
-    //scale 10\r
+    //stretch 2 2 2\r
+    //stretch 1 2 1\r
+    //stretch 10 20 1\r
 \r
 ### `//transpose x/y/z/? x/y/z/?`\r
 \r
-Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes.\r
+Transpose the current WorldEdit positions and region along given axes.\r
 \r
     //transpose x y\r
-    //transpose x z\r
     //transpose y z\r
     //transpose ? y\r
 \r
 ### `//flip x/y/z/?`\r
 \r
-Flip the current WorldEdit region along the x/y/z/? axis.\r
+Flip the current WorldEdit region along the given axis.\r
 \r
     //flip x\r
-    //flip y\r
-    //flip z\r
     //flip ?\r
 \r
 ### `//rotate x/y/z/? <angle>`\r
 \r
-Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `<angle>` (90 degree increment).\r
+Rotate the current WorldEdit positions and region along the given axis by angle `<angle>` (90 degree increment).\r
 \r
     //rotate x 90\r
     //rotate y 180\r
@@ -291,6 +345,19 @@ Fixes the lighting in the current WorldEdit region.
 \r
     //fixlight\r
 \r
+### `//drain`\r
+\r
+Removes any fluid node within the current WorldEdit region.\r
+\r
+    //drain\r
+\r
+### `//clearcut`\r
+\r
+Removes any plant, tree or foilage-like nodes in the selected region.\r
+The idea is to remove anything that isn't part of the terrain, leaving a "natural" empty space ready for building.\r
+\r
+    //clearcut\r
+\r
 ### `//hide`\r
 \r
 Hide all nodes in the current WorldEdit region non-destructively.\r
@@ -299,7 +366,7 @@ Hide all nodes in the current WorldEdit region non-destructively.
 \r
 ### `//suppress <node>`\r
 \r
-Suppress all <node> in the current WorldEdit region non-destructively.\r
+Suppress all `<node>` in the current WorldEdit region non-destructively.\r
 \r
     //suppress Diamond Block\r
     //suppress glass\r
@@ -307,7 +374,7 @@ Suppress all <node> in the current WorldEdit region non-destructively.
 \r
 ### `//highlight <node>`\r
 \r
-Highlight <node> in the current WorldEdit region by hiding everything else non-destructively.\r
+Highlight `<node>` in the current WorldEdit region by hiding everything else non-destructively.\r
 \r
     //highlight Diamond Block\r
     //highlight glass\r
@@ -351,8 +418,8 @@ Executes `<code>` as a Lua chunk in the global namespace.
 \r
 Executes `<code>` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region.\r
 \r
-    //luatransform minetest.add_node(pos, {name="default:stone"})\r
-    //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"})\r
+    //luatransform minetest.swap_node(pos, {name="default:stone"})\r
+    //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"}) end\r
 \r
 ### `//mtschemcreate <file>`\r
 \r
@@ -380,3 +447,62 @@ This mode can be left with `//mtschemprob finish`. `//mtschemprob get` will disp
 Clears all objects within the WorldEdit region.\r
 \r
     //clearobjects\r
+    \r
+### `//shift x/y/z/?/up/down/left/right/front/back [+/-]<amount>`\r
+\r
+Shifts the selection area by `[+|-]<amount>` without moving its contents.\r
+The shifting axis can be absolute (`x/y/z`) or relative (`up/down/left/right/front/back`). \r
+\r
+               //shift left 5\r
+\r
+### `//expand [+/-]x/y/z/?/up/down/left/right/front/back <amount> [reverse amount]`\r
+\r
+Expands the selection by `<amount>` in the selected absolute or relative axis.\r
+If specified, the selection can be expanded in the opposite direction over the same axis by `[reverse amount]`.\r
+\r
+               //expand right 7 5\r
+               \r
+### `//contract [+/-]x/y/z/?/up/down/left/right/front/back <amount> [reverse amount]`\r
+\r
+Contracts the selection by `<amount>` in the selected absolute or relative axis.\r
+If specified, the selection can be contracted in the opposite direction over the same axis by `[reverse amount]`.\r
+\r
+               //expand right 7 5\r
+               \r
+### `//outset [h/v] <amount>`\r
+\r
+Expands the selection in all directions by `<amount>`. If specified,\r
+the selection can be expanded horizontally in the x and z axes using `h`\r
+or vertically in the y axis using `v`.\r
+\r
+               //outset v 5\r
+               \r
+### `//inset [h/v] <amount>`\r
+\r
+Contracts the selection in all directions by `<amount>`. If specified,\r
+the selection can be contracted horizontally in the x and z axes using `h`\r
+or vertically in the y axis using `v`.\r
+\r
+               //inset h 5\r
+\r
+### `//brush none/(<command> [parameters])`\r
+\r
+Assigns the given `<command>` to the currently held brush item, it will be ran with the first pointed solid node (as determined via raycast) as\r
+WorldEdit position 1 when using that specific brush item.\r
+Passing `none` instead clears the command assigned to the currently held brush item.\r
+Note that this functionality requires the `worldedit_brush` mod enabled.\r
+\r
+               //brush cube 8 8 8 Cobblestone\r
+               //brush spr 12 glass\r
+               //brush none\r
+\r
+### `//cubeapply <size>/(<sizex> <sizey> <sizez>) <command> [parameters]`\r
+\r
+Selects a cube with side length of `<size>` around the WorldEdit position 1 and runs the given `<command>` on the newly selected region.\r
+If `<sizex>`, `<sizey>` and `<sizez>` are given, they instead specify the length of the cuboid in X, Y, Z direction.\r
+This is mostly useful for brushes since it allows commands such as `//replace` to be ran, but it can also be used standalone.\r
+\r
+               //cubeapply 10 replaceinverse air default:water_source\r
+               //brush cubeapply 15 drain\r
+               //brush cubeapply 12 3 12 drain\r
+               //brush cubeapply 1 deleteblocks\r