forked from VoxeLibre/VoxeLibre
Improve some vines code
This commit is contained in:
parent
a70a6ef13d
commit
d1ceacf7ba
|
@ -158,12 +158,8 @@ minetest.register_node("mcl_core:vine", {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local biome_data = minetest.get_biome_data(pos)
|
local reg_biome = mcl_util.get_registered_biome_from_pos(pos)
|
||||||
local biome = biome_data.biome
|
|
||||||
local biome_name = minetest.get_biome_name(biome)
|
|
||||||
local reg_biome = minetest.registered_biomes[biome_name]
|
|
||||||
if node.name == "mcl_core:vine" then
|
if node.name == "mcl_core:vine" then
|
||||||
local biome_param2 = reg_biome._mcl_foliage_palette_index
|
local biome_param2 = reg_biome._mcl_foliage_palette_index
|
||||||
local rotation_param2 = node.param2
|
local rotation_param2 = node.param2
|
||||||
|
@ -173,7 +169,6 @@ minetest.register_node("mcl_core:vine", {
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- If dug, also dig a “dependant” vine below it.
|
-- If dug, also dig a “dependant” vine below it.
|
||||||
|
|
Loading…
Reference in New Issue