From fdc9831e8a68ecd6d9662597a948f0b699e6ab2d Mon Sep 17 00:00:00 2001 From: kno10 Date: Fri, 1 Nov 2024 18:20:01 +0100 Subject: [PATCH] disable block_fixes_grass again, use all_floors decorations instead --- mods/MAPGEN/mcl_mapgen_core/init.lua | 8 +++----- mods/MAPGEN/vl_biomes/init.lua | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index ea0841805..1934e17e2 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -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) diff --git a/mods/MAPGEN/vl_biomes/init.lua b/mods/MAPGEN/vl_biomes/init.lua index f22dec68e..fd38d9512 100644 --- a/mods/MAPGEN/vl_biomes/init.lua +++ b/mods/MAPGEN/vl_biomes/init.lua @@ -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? -- 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