Skip to content

Commit

Permalink
Use vector.offset
Browse files Browse the repository at this point in the history
Co-authored-by: sfan5 <[email protected]>
  • Loading branch information
Emojigit and sfan5 authored Aug 31, 2024
1 parent b49153c commit eb68b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/default/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb68b33

Please sign in to comment.