-- feel free to copy & paste this code
natural_entities.register_spawn_group("modname:spawnname", {

    spawn_rate = 1.0,
    -- on average how often these entities will spawn.
    -- in units of hz, # of spawns per second.

    min_y = 0,
    -- minimum y entities can spawn at.

    max_y = 0,
    -- maximum y entities can spawn at.

    entities = {
        ["modname:entity"] = 1.0
    },
    -- table of floats where higher values mean higher spawn rates.

    check = function (position, ent_name) 
        return true 
    end
    -- custom check function.
    -- only stops entities from spawning if the function returns false, nil does not stop entities from spawning.

})