]> git.lizzy.rs Git - worldedit.git/blobdiff - WorldEdit API.md
Disable worldedit_brush mod instead of throwing error (#156)
[worldedit.git] / WorldEdit API.md
index f50b5062c8dd192df55051758ee2eb83c24430c6..9bcb4e88336e5c1ad8af904fe53ea0d0b80f46f0 100644 (file)
@@ -27,6 +27,12 @@ Sets a region defined by positions `pos1` and `pos2` to `node_name`. To clear a
 \r
 Returns the number of nodes set.\r
 \r
+### `count = worldedit.set_param2(pos1, pos2, param2)`\r
+\r
+Sets the param2 values of all nodes in a region defined by positions `pos1` and `pos2` to `param2`.\r
+\r
+Returns the number of nodes set.\r
+\r
 ### count = worldedit.replace(pos1, pos2, searchnode, replacenode)\r
 \r
 Replaces all instances of `searchnode` with `replacenode` in a region defined by positions `pos1` and `pos2`.\r
@@ -45,6 +51,12 @@ Copies the region defined by positions `pos1` and `pos2` along the `axis` axis (
 \r
 Returns the number of nodes copied.\r
 \r
+### count = worldedit.copy2(pos1, pos2, off)\r
+\r
+Copies the region defined by positions `pos1` and `pos2` by the offset vector `off`.\r
+\r
+Returns the number of nodes copied.\r
+\r
 ### count = worldedit.move(pos1, pos2, axis, amount)\r
 \r
 Moves the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") by `amount` nodes.\r
@@ -109,6 +121,12 @@ Primitives
 ----------\r
 Contained in primitives.lua, this module allows the creation of several geometric primitives.\r
 \r
+### count = worldedit.cube(pos, width, height, length, node_name, hollow)\r
+\r
+Adds a cube with its ground level centered at `pos`, the dimensions `width` x `height` x `length`, composed of `node_name`.\r
+\r
+Returns the number of nodes added.\r
+\r
 ### count = worldedit.sphere(pos, radius, node_name, hollow)\r
 \r
 Adds a sphere centered at `pos` with radius `radius`, composed of `node_name`.\r
@@ -121,15 +139,15 @@ Adds a dome centered at `pos` with radius `radius`, composed of `node_name`.
 \r
 Returns the number of nodes added.\r
 \r
-### count = worldedit.cylinder(pos, axis, length, radius, node_name, hollow)\r
+### count = worldedit.cylinder(pos, axis, length, radius1, radius2, node_name, hollow)\r
 \r
-Adds a cylinder at `pos` along the `axis` axis ("x" or "y" or "z") with length `length` and radius `radius`, composed of `node_name`.\r
+Adds a cylinder-like at `pos` along the `axis` axis ("x" or "y" or "z") with length `length`, base radius `radius1` and top radius `radius2`, composed of `node_name`.\r
 \r
 Returns the number of nodes added.\r
 \r
-### count = worldedit.pyramid(pos, axis, height, node_name)\r
+### count = worldedit.pyramid(pos, axis, height, node_name, hollow)\r
 \r
-Adds a pyramid centered at `pos` along the `axis` axis ("x" or "y" or "z") with height `height`.\r
+Adds a pyramid centered at `pos` along the `axis` axis ("x" or "y" or "z") with height `height`, composed of `node_name`.\r
 \r
 Returns the number of nodes added.\r
 \r
@@ -175,7 +193,7 @@ Returns the number of nodes restored.
 \r
 Serialization\r
 -------------\r
-Contained in serialization.lua, this module allows regions of nodes to be serialized and deserialized to formats suitable for use outside MineTest.\r
+Contained in serialization.lua, this module allows regions of nodes to be serialized and deserialized to formats suitable for use outside Minetest.\r
 \r
 ### version, extra_fields, content = worldedit.read_header(value)\r
 \r