]> git.lizzy.rs Git - worldedit.git/blobdiff - ChatCommands.md
Call minetest.deserialize with safe=true
[worldedit.git] / ChatCommands.md
index 0c8b3a111886b68afe2c59b0fbc9fee751dbd54e..528f2dfc02280c0974ea1a3b3b819e74202252fb 100644 (file)
@@ -17,11 +17,15 @@ 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
@@ -100,7 +104,7 @@ Display the volume of the current WorldEdit region.
 \r
 ### `//deleteblocks`\r
 \r
-Delete the MapBlocks (16x16x16 units) that contain the selected region. This means that mapgen will be invoked for that area. As only whole MapBlocks get removed, the deleted area is usually larger than the selected one. Also, mapgen can trigger mechanisms like mud reflow or cavegen, which affects nodes (up to 112 nodes away) outside the MapBlock, so dont use this near buildings.\r
+Delete the MapBlocks (16x16x16 units) that contain the selected region. This means that mapgen will be invoked for that area. As only whole MapBlocks get removed, the deleted area is usually larger than the selected one. Also, mapgen can trigger mechanisms like mud reflow or cavegen, which affects nodes (up to 112 nodes away) outside the MapBlock, so dont use this near buildings. Note that active entities are not part of a MapBlock and do not get deleted.\r
 \r
     //deleteblocks\r
 \r
@@ -113,14 +117,20 @@ Set the current WorldEdit region to `<node>`.
     //set Blue Lightstone\r
     //set dirt with grass\r
 \r
-### `//mix <node1> ...`\r
+### `//param2 <param2>`\r
 \r
-Fill the current WorldEdit region with a random mix of `<node1>`, `...`.\r
+Set the param2 value of all nodes in the current WorldEdit region to `<param2>`.\r
+\r
+### `//mix <node1> [<count1>] <node2> [<count2>]...`\r
+\r
+Fill the current WorldEdit region with a random mix of `<node1>`, `<node2>`, `...`. Weightings can be optionally specified via a number 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 +150,19 @@ 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 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 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,24 +195,45 @@ 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 x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
+Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, base radius `<radius1>` (and top radius `[radius2]`), composed of `<node>`.\r
+\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
+### `//cylinder x/y/z/? <length> <radius1> [radius2] <node>`\r
 \r
-Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>` and radius `<radius>`, composed of `<node>`.\r
+Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length `<length>`, 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
+### `//hollowpyramid x/y/z? <height> <node>`\r
+\r
+Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height `<height>`, composed of `<node>`.\r
+\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 x/y/z/? axis with height `<height>`, composed of `<node>`.\r
@@ -241,13 +285,13 @@ 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 `<stretchx>`, `<stretchy>`, `<stretchz>` along the X, Y, and Z axes, repectively, 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
@@ -291,6 +335,12 @@ 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
 ### `//hide`\r
 \r
 Hide all nodes in the current WorldEdit region non-destructively.\r
@@ -380,3 +430,49 @@ 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 touching its contents. The shifting axis can be absolute (`x/y/z`) or \r
+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. If specified, the selection can be expanded in the\r
+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. If specified, the selection can be contracted in the\r
+opposite direction over the same axis by `[reverse-amount]`.\r
+\r
+               //expand right 7 5\r
+               \r
+### `//outset [hv] <amount>`\r
+\r
+Expands the selection in all directions by `<amount>`. If specified, the selection can be expanded horizontally in the x and z axes `[h]`\r
+or vertically in the y axis `[v]`.\r
+\r
+               //outset v 5\r
+               \r
+### `//inset [hv] <amount>`\r
+\r
+Contracts the selection in all directions by `<amount>`. If specified, the selection can be contracted horizontally in the x and z axes `[h]`\r
+or vertically in the y axis `[v]`.\r
+\r
+               //outset v 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