---------------------------------------------
-------------MAPGENS
---------------------------------------------


local localheatpoint = minetest.settings:get("variety_fork.autumn_forest_heat") or 71
local localhumiditypoint = minetest.settings:get("variety_fork.autumn_forest_humidity") or 84

	minetest.register_biome({
		name = "autumn_forest",
		node_top = "variety:autumn_forest_grass",
		depth_top = 1,
		node_filler = "default:dirt",
		depth_filler = 3,
		node_riverbed = "variety:autumn_forest_grass",
		depth_riverbed = 2,
		node_dungeon = "default:cobble",
		node_dungeon_alt = "default:mossycobble",
		node_dungeon_stair = "stairs:stair_cobble",
		y_max = 31000,
		y_min = 6,
		heat_point = localheatpoint,
		humidity_point = localhumiditypoint,
	})

minetest.register_decoration({
	deco_type = "simple",
	place_on = {"variety:autumn_forest_grass"},
	sidelen = 16,
	fill_ratio = 0.05,
	biomes = {"autumn_forest"},
	decoration = {
        "default:dry_shrub", "flowers:mushroom_brown",
        "variety:autumn_forest_grass_1", "variety:autumn_forest_grass_2",
        "variety:autumn_forest_grass_3", "variety:autumn_forest_grass_4",
        "variety:autumn_forest_grass_5",
	}
})

minetest.register_decoration({
	deco_type = "simple",
	place_on = {"variety:autumn_forest_grass"},
	sidelen = 16,
	fill_ratio = 0.006,
	biomes = {"autumn_forest"},
	decoration = {
        "variety:pumpkin_block",
	}
})

minetest.register_decoration({
    name = "variety:autumn_forest_brush",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.003265,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_bush.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:autumn_forest_log_1",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.003265,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_log_1.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:autumn_forest_log_2",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.003265,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_log_2.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:autumn_forest_tree_1",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.0111325,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_tree_1.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:autumn_forest_tree_2",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.0111325,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_tree_2.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:autumn_forest_tree_3",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.0111325,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/autumn_forest_tree_3.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})

minetest.register_decoration({
    name = "variety:racine_1",
    deco_type = "schematic",
    place_on = {"variety:autumn_forest_grass"},
    place_offset_y = 0,
    sidelen = 16,
    fill_ratio = 0.000665,
    biomes = {"autumn_forest"},
    y_max = 31000,
    y_min = -20,
    schematic = minetest.get_modpath("variety").."/schematics/racine_1.mts",
	flags = "place_center_x, place_center_z",
	rotation = "random",
})
