
local sealevel = pmb_vars.overworld.sea_level
local alt_max = pmb_vars.overworld.alt_max
local alt_min = pmb_vars.overworld.alt_min

local function do_grass_stuff(num, seed)
    minetest.register_decoration({
        deco_type = "simple",
        place_on = {"pmb_soil:dirt_with_grass"},
        sidelen = 4,
        noise_params = {
            offset = 0.1,
            scale = 0.4,
            spread = {x = 4, y = 8, z = 4},
            seed = seed,
            octaves = 1,
            persist = 0.2
        },
        biomes = pmb_biomes.registered.grass or {},
        y_max = alt_max,
        y_min = sealevel,
        decoration = "pmb_flora:grass_"..num,
    })
end

do_grass_stuff(0, 6546)
do_grass_stuff(1, 6546)
do_grass_stuff(2, 6546)
do_grass_stuff(3, 6546)
