From eb68b33ba9608e798823789f813c136f03bbd8ba Mon Sep 17 00:00:00 2001 From: 1F616EMO~nya Date: Sun, 1 Sep 2024 07:13:56 +0800 Subject: [PATCH] Use vector.offset Co-authored-by: sfan5 --- mods/default/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 3514aebd..71be44e2 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -306,8 +306,8 @@ function default.dig_up(pos, node, digger, max_height) max_height = max_height or 100 in_dig_up = true - for y = pos.y + 1, pos.y + max_height do - local up_pos = vector.new(pos.x, y, pos.z) + for y = 1, max_height do + local up_pos = vector.offset(pos, 0, y, 0) local up_node = minetest.get_node(up_pos) if up_node.name ~= node.name then break