mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 16:41:06 +01:00
Improve some vines code
This commit is contained in:
parent
a70a6ef13d
commit
d1ceacf7ba
1 changed files with 9 additions and 14 deletions
|
@ -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 a new issue