Fix bug in get_node_lvm()

This commit is contained in:
Joachim Stolberg 2020-12-15 09:26:09 +01:00
parent 47134e0309
commit 5126bfb595

View File

@ -99,12 +99,14 @@ function techage.get_node_lvm(pos)
local data = vm:get_data() local data = vm:get_data()
local param2_data = vm:get_param2_data() local param2_data = vm:get_param2_data()
local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge}) local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge})
local idx = area:index(pos.x, pos.y, pos.z) local idx = area:indexp(pos)
node = { if data[idx] and param2_data[idx] then
name = minetest.get_name_from_content_id(data[idx]), return {
param2 = param2_data[idx] name = minetest.get_name_from_content_id(data[idx]),
} param2 = param2_data[idx]
return node }
end
return {name="ignore", param2=0}
end end
-- --