summaryrefslogtreecommitdiff
path: root/worldedit/primitives.lua
diff options
context:
space:
mode:
Diffstat (limited to 'worldedit/primitives.lua')
-rw-r--r--worldedit/primitives.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/worldedit/primitives.lua b/worldedit/primitives.lua
index edb7db6..fe22fff 100644
--- a/worldedit/primitives.lua
+++ b/worldedit/primitives.lua
@@ -158,7 +158,7 @@ function worldedit.pyramid(pos, axis, height, node_name, hollow)
-- Set up voxel manipulator
local manip, area = mh.init_axis_radius(pos, axis,
height >= 0 and height or -height)
- local data = mh.get_empty_data()
+ local data = mh.get_empty_data(area)
-- Handle inverted pyramids
local start_axis, end_axis, step
@@ -178,7 +178,7 @@ function worldedit.pyramid(pos, axis, height, node_name, hollow)
y = pos.y - area.MinEdge.y,
z = pos.z - area.MinEdge.z,
}
- local size = height * step
+ local size = math.abs(height * step)
local count = 0
-- For each level of the pyramid
for index1 = 0, height, step do