1
0
Fork 0

Fix incomplete dry grass replacement LBM

This commit is contained in:
Wuzzy 2020-04-27 14:05:09 +02:00
parent c81a18ac1a
commit eea07f0ce7
1 changed files with 7 additions and 2 deletions

View File

@ -757,9 +757,10 @@ minetest.register_abm({
end, end,
}) })
local SAVANNA_INDEX = 1
minetest.register_lbm({ minetest.register_lbm({
label = "Replace legacy dry grass", label = "Replace legacy dry grass",
name = "mcl_core:replace_legacy_dry_grass", name = "mcl_core:replace_legacy_dry_grass_0_65_0",
nodenames = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt_with_dry_grass_snow"}, nodenames = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt_with_dry_grass_snow"},
action = function(pos, node) action = function(pos, node)
local biome_data = minetest.get_biome_data(pos) local biome_data = minetest.get_biome_data(pos)
@ -776,11 +777,15 @@ minetest.register_lbm({
node.param2 = reg_biome._mcl_palette_index node.param2 = reg_biome._mcl_palette_index
-- Fall back to savanna palette index -- Fall back to savanna palette index
if not node.param2 then if not node.param2 then
node.param2 = 1 node.param2 = SAVANNA_INDEX
end end
minetest.set_node(pos, node) minetest.set_node(pos, node)
return
end end
end end
node.param2 = SAVANNA_INDEX
minetest.set_node(pos, node)
return
end, end,
}) })