0
0
Fork 0

Fix broken legacy dry grass LBM

This commit is contained in:
Wuzzy 2019-12-14 01:41:49 +01:00
parent affb984c56
commit 5f2cc506f0
1 changed files with 7 additions and 2 deletions

View File

@ -763,13 +763,18 @@ minetest.register_lbm({
nodenames = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt_with_dry_grass_snow"},
action = function(pos, node)
local biome_data = minetest.get_biome_data(pos)
local index = 0
if biome_data then
local biome = biome_data.biome
local biome_name = minetest.get_biome_name(biome)
local reg_biome = minetest.registered_biomes[biome_name]
if reg_biome then
minetest.set_node(pos, {name = node.name, param2 = reg_biome._mcl_palette_index})
if node.name == "mcl_core:dirt_with_dry_grass_snow" then
node.name = "mcl_core:dirt_with_grass_snow"
else
node.name = "mcl_core:dirt_with_grass"
end
node.param2 = reg_biome._mcl_palette_index
minetest.set_node(pos, node)
end
end
end,