Merge pull request 'Fix crash when using /spawnstruct in singlenode mg' (#2502) from fix-singlenode-spawnstruct into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2502 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
56f5ffc09c
|
@ -63,11 +63,13 @@ function mcl_structures.place_structure(pos, def, pr, blockseed)
|
||||||
if minetest.get_mapgen_setting("mg_name") ~= "v6" then
|
if minetest.get_mapgen_setting("mg_name") ~= "v6" then
|
||||||
local b = minetest.registered_biomes[minetest.get_biome_name(minetest.get_biome_data(pos).biome)]
|
local b = minetest.registered_biomes[minetest.get_biome_name(minetest.get_biome_data(pos).biome)]
|
||||||
--minetest.log(dump(b.node_top))
|
--minetest.log(dump(b.node_top))
|
||||||
|
if b then
|
||||||
if b.node_top then node_top = b.node_top end
|
if b.node_top then node_top = b.node_top end
|
||||||
if b.node_filler then node_filler = b.node_filler end
|
if b.node_filler then node_filler = b.node_filler end
|
||||||
if b.node_stone then node_stone = b.node_stone end
|
if b.node_stone then node_stone = b.node_stone end
|
||||||
if b.node_dust then node_dust = b.node_dust end
|
if b.node_dust then node_dust = b.node_dust end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
local replace = {"air","group:liquid","mcl_core:snow","group:tree","group:leaves"}
|
local replace = {"air","group:liquid","mcl_core:snow","group:tree","group:leaves"}
|
||||||
minetest.bulk_set_node(minetest.find_nodes_in_area(ground_p1,ground_p2,replace),{name=node_top})
|
minetest.bulk_set_node(minetest.find_nodes_in_area(ground_p1,ground_p2,replace),{name=node_top})
|
||||||
if node_dust then
|
if node_dust then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user