update ground content check

This commit is contained in:
FaceDeer 2020-01-26 19:58:34 -07:00
parent a75cdf65e8
commit deae92e2ab
2 changed files with 6 additions and 4 deletions

View File

@ -68,12 +68,14 @@ mapgen_helper.buildable_to = function(c_node)
return buildable_to[c_node]
end
local is_ground_content
local is_ground_content = nil
mapgen_helper.is_ground_content = function(c_node) -- If false, the cave generator will not carve through this node
if is_ground_content then return is_ground_content[c_node] end
if is_ground_content ~= nil then
return is_ground_content[c_node]
end
is_ground_content = {}
for k, v in pairs(minetest.registered_nodes) do
if v.is_ground_content then
if v.is_ground_content == true then
is_ground_content[minetest.get_content_id(k)] = true
end
end