From 2ac6ea03a7de40ba34e5202710cde530a9b4a55b Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 10 Oct 2020 21:50:03 +0100 Subject: [PATCH] Fix some bugs, but the new //subdivide still doesn't work yet --- worldeditadditions/lib/subdivide.lua | 6 +++--- worldeditadditions/utils/nodes.lua | 2 +- worldeditadditions_commands/commands/meta/subdivide.lua | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worldeditadditions/lib/subdivide.lua b/worldeditadditions/lib/subdivide.lua index bfb91a4..78d28be 100644 --- a/worldeditadditions/lib/subdivide.lua +++ b/worldeditadditions/lib/subdivide.lua @@ -50,13 +50,13 @@ local function subdivide_step_complete(state) end local function subdivide_step_beforeload(state) - state.cpos.z = state.cpos.z - (chunk_size.z + 1) + state.cpos.z = state.cpos.z - (state.chunk_size.z + 1) if state.cpos.z <= state.pos1.z then state.cpoz.z = state.pos2.z - state.cpos.y = state.cpos.y - (chunk_size.y + 1) + state.cpos.y = state.cpos.y - (state.chunk_size.y + 1) if state.cpos.y <= state.pos1.y then state.cpos.y = state.pos2.y - state.cpos.x = state.cpos.x - (chunk_size.x + 1) + state.cpos.x = state.cpos.x - (state.chunk_size.x + 1) if state.cpos.x <= state.pos1.x then subdivide_step_complete(state) return diff --git a/worldeditadditions/utils/nodes.lua b/worldeditadditions/utils/nodes.lua index df8a1a0..6803e93 100644 --- a/worldeditadditions/utils/nodes.lua +++ b/worldeditadditions/utils/nodes.lua @@ -86,5 +86,5 @@ function worldeditadditions.emerge_area(pos1, pos2, callback, callback_state) callback = callback, callback_state = callback_state } - minetest.emerge_area(pos1, pos2, emerge_callback, states) + minetest.emerge_area(pos1, pos2, emerge_callback, state) end diff --git a/worldeditadditions_commands/commands/meta/subdivide.lua b/worldeditadditions_commands/commands/meta/subdivide.lua index 25f8141..4e2e8cf 100644 --- a/worldeditadditions_commands/commands/meta/subdivide.lua +++ b/worldeditadditions_commands/commands/meta/subdivide.lua @@ -84,7 +84,7 @@ worldedit.register_command("subdivide", { local msg_prefix = "[ subdivide | "..table.concat({cmd_name, args}, " ").." ] " local time_last_msg = wea.get_ms_time() - wea.subdivide(cpos1, cpos2, chunk_size, function(bpos1, bpos2, stats) + wea.subdivide(pos1, pos2, chunk_size, function(cpos1, cpos2, stats) -- Called on every subblock if stats.chunks_completed == 0 then worldedit.player_notify(name, string.format(