Use vector.offset

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
1F616EMO~nya 2024-09-01 07:13:56 +08:00 committed by GitHub
parent b49153cf12
commit eb68b33ba9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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