Fix crash from missing content id

This commit is contained in:
ElCeejo 2022-04-05 21:18:16 -07:00 committed by GitHub
parent 3c899ffd12
commit 93c5127d1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -254,6 +254,7 @@ minetest.register_on_generated(function(minp, maxp)
for y = max_y, 2, -1 do
local vi = area:index(xcen, y, zcen)
local c_node = data[vi]
if not c_node then break end
local c_name = minetest.get_name_from_content_id(c_node)
local c_def = minetest.registered_nodes[c_name]
if y == max_y and c_node ~= c_air then -- if top node solid