From 1129cb160176c307065712a8ed57b3751c5ce9f1 Mon Sep 17 00:00:00 2001 From: Hybrid Dog Date: Sat, 3 Feb 2018 15:12:38 +0100 Subject: [PATCH] Update to newest worldedit --- README.md | 1 + init.lua | 19 +++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2a14c9c..5f0fd57 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ Not yet implemented: * /contract * /outset * /inset +* /cube /hollowcube * /copy * /move * /stack diff --git a/init.lua b/init.lua index b318087..6b4fad9 100644 --- a/init.lua +++ b/init.lua @@ -688,19 +688,14 @@ local function pyramid_func(_,_, ...) end local function my_we_pyramid(pos, axis, height, ...) local h = math.ceil(math.abs(height)) - -- This code is commented because of a worldedit pyramid wrapping bug. FIXME - --~ local pos1 = vector.subtract(pos, h-1) - --~ local pos2 = vector.add(pos, h-1) + local pos1 = vector.subtract(pos, h-1) + local pos2 = vector.add(pos, h-1) - --~ if height > 0 then - --~ pos1[axis] = pos[axis] - --~ else - --~ pos2[axis] = pos[axis] - --~ end - - -- This workaround doesn't necessarily work right. It worked when tested. - local pos1 = vector.subtract(pos, h + 15) - local pos2 = vector.add(pos, h + 15) + if height > 0 then + pos1[axis] = pos[axis] + else + pos2[axis] = pos[axis] + end return we_nodeset_wrapper(pyramid_func, pos1, pos2, pos, axis, height, ...) end