mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-07 17:17:31 +01:00
disable block_fixes_grass again, use all_floors decorations instead
This commit is contained in:
parent
186ee9fd37
commit
d1b16670b6
@ -370,13 +370,12 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl
|
|||||||
return lvm_used, lvm_used, deco, ores
|
return lvm_used, lvm_used, deco, ores
|
||||||
end
|
end
|
||||||
|
|
||||||
-- largely replaced with decoration hack to replace grass nodes
|
--[[ largely replaced with decoration hack to replace grass nodes
|
||||||
-- except for cavegen, which still only produces param2=0
|
|
||||||
local function block_fixes_grass(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
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.
|
-- 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
|
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"})
|
set_grass_palette(minp,maxp,data2,area,{"group:grass_palette"})
|
||||||
end
|
end]]
|
||||||
|
|
||||||
--[[ replaced with schematic specialization per biome
|
--[[ replaced with schematic specialization per biome
|
||||||
local function block_fixes_foliage(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
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)
|
mcl_mapgen_core.register_generator("end_fixes", end_basic, nil, 9999, true)
|
||||||
|
|
||||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||||
-- cavegen will still produce param2=0 only
|
-- replaced with decoration mechanism: mcl_mapgen_core.register_generator("block_fixes_grass", block_fixes_grass, nil, 9999, true)
|
||||||
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)
|
-- 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)
|
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)
|
-- 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,
|
-- Fix the grass color via decoration mechanism,
|
||||||
-- by replacing node_top with node_top and param2 set
|
-- by replacing node_top with node_top and param2 set
|
||||||
-- TODO: this can be removed when param2 support to biomes is added
|
-- 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>
|
-- <https://github.com/minetest/minetest/issues/15319>
|
||||||
vl_biomes.fix_grass_color = function(def)
|
vl_biomes.fix_grass_color = function(def)
|
||||||
if (def._mcl_grass_palette_index or 0) == 0 then return end -- not necessary
|
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
|
fill_ratio = 10, -- everything
|
||||||
decoration = name,
|
decoration = name,
|
||||||
param2 = param2,
|
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
|
place_offset_y = -1, -- replace the node itself
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user