]> git.lizzy.rs Git - worldedit.git/blobdiff - worldedit/manipulations.lua
Update `stack2` API documentation.
[worldedit.git] / worldedit / manipulations.lua
index 80541fcd30bb8e76b78afc26bb5b5ec22120aed9..fb8506fd56ffbaa27f481a747206e05c11170d9c 100644 (file)
@@ -124,6 +124,7 @@ worldedit.replaceinverse = function(pos1, pos2, searchnode, replacenode)
        return count\r
 end\r
 \r
+--copies the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") by `amount` nodes, returning the number of nodes copied\r
 worldedit.copy = function(pos1, pos2, axis, amount) --wip: replace the old version below\r
        local pos1, pos2 = worldedit.sort_pos(pos1, pos2)\r
 \r
@@ -282,6 +283,7 @@ worldedit.copy2 = function(pos1, pos2, direction, volume)
        end\r
 end\r
 \r
+--duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`, returning the number of nodes stacked\r
 worldedit.stack2 = function(pos1, pos2, direction, amount, finished)\r
        local i = 0\r
        local translated = {x=0,y=0,z=0}\r
@@ -300,7 +302,7 @@ worldedit.stack2 = function(pos1, pos2, direction, amount, finished)
                end\r
        end\r
        nextone()\r
-       return nil\r
+       return worldedit.volume(pos1, pos2) * amount\r
 end\r
 \r
 --copies the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") by `amount` nodes, returning the number of nodes copied\r