-- plants and other small decorations
minetest.register_decoration({
    deco_type = "simple",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.009,
    biomes = PyuTestCore.get_flowering_biomes(),
    decoration = PyuTestCore.registered_flowers
})

minetest.register_decoration({
    deco_type = "simple",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.032,
    biomes = PyuTestCore.get_extra_flowering_biomes(),
    decoration = PyuTestCore.registered_flowers
})

minetest.register_decoration({
    deco_type = "simple",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.048,
    biomes = {"grassland"},
    decoration = "pyutest_core:grass_plant"
})

minetest.register_decoration({
    deco_type = "simple",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.0018,
    biomes = {"grassland"},
    decoration = "pyutest_core:haybale_block"
})

minetest.register_decoration({
    deco_type = "simple",
    place_on = {"pyutest_core:dirt_block", "pyutest_core:sand_block"},
    sidelen = 16,
    fill_ratio = 0.019,
    biomes = {"desert"},
    decoration = "pyutest_core:deadbush"
})

minetest.register_decoration({
    deco_type = "simple",
    sidelen = 16,
    fill_ratio = 0.03,
    place_on = {"pyutest_core:water_source"},
    biomes = {"swamp", "swamp_ocean"},
    y_max = PyuTestCore_WorldTop,
    y_min = 0,
    decoration = "pyutest_core:lilypad",
    flags = "liquid_surface"
})

minetest.register_decoration({
    deco_type = "simple",
    sidelen = 16,
    fill_ratio = 0.04,
    place_on = {"group:sugarcane_spawn_on"},
    decoration = "pyutest_core:sugarcane",
    y_max = PyuTestCore_SurfaceBottom,
    y_min = 0,
    spawn_by = {"pyutest_core:water_source"},
    num_spawn_by = 1,
    height = 1,
    height_max = 4
})

-- trees
minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"forest", "old_growth_forest"},
    schematic = PyuTestCore.get_schem_path("Tree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.00045,
    biomes = {"grassland"},
    schematic = PyuTestCore.get_schem_path("Tree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"forest", "old_growth_forest"},
    schematic = PyuTestCore.get_schem_path("Tree2"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.00085,
    biomes = {"savanna"},
    schematic = PyuTestCore.get_schem_path("SavannaTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:mycelium_block"},
    sidelen = 16,
    fill_ratio = 0.003,
    biomes = {"mushroom_fields", "large_mushroom_forest"},
    schematic = PyuTestCore.get_schem_path("Mushroom"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.003,
    biomes = {"old_growth_forest"},
    schematic = PyuTestCore.get_schem_path("OldGrowthTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.005,
    biomes = {"taiga"},
    schematic = PyuTestCore.get_schem_path("TaigaTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:grass_block"},
    sidelen = 16,
    fill_ratio = 0.005,
    biomes = {"birch_forest"},
    schematic = PyuTestCore.get_schem_path("BirchTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:grass_block"},
    sidelen = 16,
    fill_ratio = 0.005,
    biomes = {"birch_forest", "old_growth_birch_forest"},
    schematic = PyuTestCore.get_schem_path("TallBirchTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:grass_block"},
    sidelen = 16,
    fill_ratio = 0.005,
    biomes = {"cherry_grove"},
    schematic = PyuTestCore.get_schem_path("CherryTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:snow_block"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"snowy_forest"},
    schematic = PyuTestCore.get_schem_path("SnowyTree1"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:snow_block"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"snowy_forest"},
    schematic = PyuTestCore.get_schem_path("SnowyTree2"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"swamp"},
    schematic = PyuTestCore.get_schem_path("SwampTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:grass_block"},
    sidelen = 16,
    fill_ratio = 0.004,
    biomes = {"old_growth_birch_forest"},
    schematic = PyuTestCore.get_schem_path("VeryTallBirchTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.016,
    biomes = {"aspen_forest"},
    schematic = PyuTestCore.get_schem_path("AspenTree1"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.008,
    biomes = {"aspen_forest"},
    schematic = PyuTestCore.get_schem_path("AspenTree2"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:podzol_block"},
    sidelen = 16,
    fill_ratio = 0.019,
    biomes = {"redwood_forest"},
    schematic = PyuTestCore.get_schem_path("RedwoodTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.010,
    biomes = {"jungle"},
    schematic = PyuTestCore.get_schem_path("JungleTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.008,
    biomes = {"jungle"},
    schematic = PyuTestCore.get_schem_path("SmallJungleTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.013,
    biomes = {"jungle"},
    schematic = PyuTestCore.get_schem_path("LargeJungleTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.008,
    biomes = {"jungle"},
    schematic = PyuTestCore.get_schem_path("JungleBush"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:mycelium_block"},
    sidelen = 16,
    fill_ratio = 0.006,
    biomes = {"large_mushroom_forest"},
    schematic = PyuTestCore.get_schem_path("TallMushroom"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:mycelium_block"},
    sidelen = 16,
    fill_ratio = 0.002,
    biomes = {"large_mushroom_forest"},
    schematic = PyuTestCore.get_schem_path("SmallMushroom"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    place_offset_y = 1,
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"pyutest_core:mycelium_block"},
    sidelen = 16,
    fill_ratio = 0.007,
    biomes = {"large_mushroom_forest"},
    schematic = PyuTestCore.get_schem_path("FallenMushroom"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    place_offset_y = 1,
    force_placement = true
})

minetest.register_decoration({
    deco_type = "schematic",
    place_on = {"group:grass"},
    sidelen = 16,
    fill_ratio = 0.003,
    biomes = {"vyn_forest"},
    schematic = PyuTestCore.get_schem_path("VynTree"),
    rotation = "random",
    flags = "place_center_x, place_center_z",
    place_offset_y = 1,
    force_placement = true
})
