Skip to content

Commit 5d41458

Browse files
committed
Worldedit_brush: fix crash
1 parent 379b882 commit 5d41458

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

worldedit_brush/init.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ local brush_on_use = function(itemstack, placer)
4141

4242
assert(pointed_thing.type == "node")
4343
worldedit.pos1[name] = pointed_thing.under
44-
worldedit.pos2[name] = nil
44+
45+
-- Hotfix for `cubeapply`
46+
if cmddef.require_pos == 2 then
47+
worldedit.pos2[name] = pointed_thing.under
48+
else
49+
worldedit.pos2[name] = nil
50+
end
51+
4552
worldedit.marker_update(name)
4653

4754
-- this isn't really clean...

0 commit comments

Comments
 (0)