Skip to content

Commit 9616c7d

Browse files
committedJul 6, 2014
Update stack2 API documentation.
1 parent 175ac21 commit 9616c7d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

Diff for: ‎WorldEdit API.md

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Duplicates the region defined by positions `pos1` and `pos2` along the `axis` ax
5757

5858
Returns the number of nodes stacked.
5959

60+
### count = worldedit.stack2(pos1, pos2, direction, amount)
61+
62+
Duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`.
63+
64+
Returns the number of nodes stacked.
65+
6066
### count, newpos1, newpos2 = worldedit.stretch(pos1, pos2, stretchx, stretchy, stretchz)
6167

6268
Stretches the region defined by positions `pos1` and `pos2` by an factor of positive integers `stretchx`, `stretchy`. and `stretchz` along the X, Y, and Z axes, respectively, with `pos1` as the origin.

Diff for: ‎worldedit/manipulations.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ worldedit.replaceinverse = function(pos1, pos2, searchnode, replacenode)
124124
return count
125125
end
126126

127+
--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
127128
worldedit.copy = function(pos1, pos2, axis, amount) --wip: replace the old version below
128129
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
129130

@@ -282,6 +283,7 @@ worldedit.copy2 = function(pos1, pos2, direction, volume)
282283
end
283284
end
284285

286+
--duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`, returning the number of nodes stacked
285287
worldedit.stack2 = function(pos1, pos2, direction, amount, finished)
286288
local i = 0
287289
local translated = {x=0,y=0,z=0}
@@ -300,7 +302,7 @@ worldedit.stack2 = function(pos1, pos2, direction, amount, finished)
300302
end
301303
end
302304
nextone()
303-
return nil
305+
return worldedit.volume(pos1, pos2) * amount
304306
end
305307

306308
--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

0 commit comments

Comments
 (0)
Please sign in to comment.