disable block_fixes_grass again, use all_floors decorations instead

This commit is contained in:
kno10 2024-11-01 18:20:01 +01:00
parent a0d7418483
commit fdc9831e8a
2 changed files with 5 additions and 6 deletions

@ -370,13 +370,12 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl
return lvm_used, lvm_used, deco, ores
end
-- largely replaced with decoration hack to replace grass nodes
-- except for cavegen, which still only produces param2=0
--[[ largely replaced with decoration hack to replace grass nodes
local function block_fixes_grass(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
-- Set param2 (=color) of nodes which use the grass colour palette.
return minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min and
set_grass_palette(minp,maxp,data2,area,{"group:grass_palette"})
end
end]]
--[[ replaced with schematic specialization per biome
local function block_fixes_foliage(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
@ -421,8 +420,7 @@ mcl_mapgen_core.register_generator("world_structure", world_structure, nil, 1, t
mcl_mapgen_core.register_generator("end_fixes", end_basic, nil, 9999, true)
if mg_name ~= "v6" and mg_name ~= "singlenode" then
-- cavegen will still produce param2=0 only
mcl_mapgen_core.register_generator("block_fixes_grass", block_fixes_grass, nil, 9999, true)
-- replaced with decoration mechanism: mcl_mapgen_core.register_generator("block_fixes_grass", block_fixes_grass, nil, 9999, true)
-- replaced with schema specialization: mcl_mapgen_core.register_generator("block_fixes_foliage", block_fixes_foliage, nil, 9999, true)
mcl_mapgen_core.register_generator("block_fixes_water", block_fixes_water, nil, 9999, true)
-- replaced with using param2=3 during generation mcl_mapgen_core.register_generator("block_fixes_seagrass", block_fixes_seagrass, nil, 9999, true)

@ -40,6 +40,7 @@ vl_biomes.overworld_biomes = {}
-- Fix the grass color via decoration mechanism,
-- by replacing node_top with node_top and param2 set
-- TODO: this can be removed when param2 support to biomes is added
-- TODO: one per param2, instead of one per biome?
-- <https://github.com/minetest/minetest/issues/15319>
vl_biomes.fix_grass_color = function(def)
if (def._mcl_grass_palette_index or 0) == 0 then return end -- not necessary
@ -59,7 +60,7 @@ vl_biomes.fix_grass_color = function(def)
fill_ratio = 10, -- everything
decoration = name,
param2 = param2,
flags = "force_placement",
flags = "all_floors, force_placement", -- all_floors, or cavegen holes may have wrong grass
place_offset_y = -1, -- replace the node itself
})
end