forked from VoxeLibre/VoxeLibre
Add nil check
This commit is contained in:
parent
abdd5e11c0
commit
3a24903a01
|
@ -160,7 +160,7 @@ minetest.register_node("mcl_core:vine", {
|
|||
on_construct = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local reg_biome = mcl_util.get_registered_biome_from_pos(pos)
|
||||
if node.name == "mcl_core:vine" then
|
||||
if node.name == "mcl_core:vine" and reg_biome and reg_biome._mcl_foliage_palette_index then
|
||||
local biome_param2 = reg_biome._mcl_foliage_palette_index
|
||||
local rotation_param2 = node.param2
|
||||
local final_param2 = (biome_param2 * 8) + rotation_param2
|
||||
|
|
Loading…
Reference in New Issue