From 4bd278d6b902e21a1a3df1b177ff860238e6401e Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 14 Oct 2024 20:50:31 +0100 Subject: [PATCH] //maze, //maze3d: update to WEA pos API Ref https://worldeditadditions.mooncarrot.space/api/#worldeditadditions_core.pos --- worldeditadditions_commands/commands/maze.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/worldeditadditions_commands/commands/maze.lua b/worldeditadditions_commands/commands/maze.lua index 565b554..db85b74 100644 --- a/worldeditadditions_commands/commands/maze.lua +++ b/worldeditadditions_commands/commands/maze.lua @@ -71,13 +71,14 @@ wea_c.register_command("maze", { return success, replace_node, seed, path_length, path_width end, nodes_needed = function(name) - -- Note that we could take in additional parameters from the return value of parse (minue the success bool there), but we don't actually need them here - return worldedit.volume(worldedit.pos1[name], worldedit.pos2[name]) + -- Note that we could take in additional parameters from the return value of parse (minus the success bool there), but we don't actually need them here + local pos1, pos2 = wea_c.pos.get12(name) + return worldedit.volume(pos1, pos2) end, func = function(name, replace_node, seed, path_length, path_width) local start_time = wea_c.get_ms_time() - local pos1, pos2 = Vector3.sort(worldedit.pos1[name], worldedit.pos2[name]) + local pos1, pos2 = wea_c.pos.get12(name) local replaced = wea.maze2d( pos1, pos2, replace_node, @@ -114,7 +115,7 @@ wea_c.register_command("maze3d", { end, func = function(name, replace_node, seed, path_length, path_width, path_depth) local start_time = wea_c.get_ms_time() - local pos1, pos2 = Vector3.sort(worldedit.pos1[name], worldedit.pos2[name]) + local pos1, pos2 = Vector3.sort(weac.pos.get12(name)) local replaced = wea.maze3d( pos1, pos2, replace_node,