diff --git a/pl_sunflowers/init.lua b/pl_sunflowers/init.lua index 6416790..c7aaec8 100644 --- a/pl_sunflowers/init.lua +++ b/pl_sunflowers/init.lua @@ -1,10 +1,6 @@ -- support for i18n local S = minetest.get_translator("pl_sunflowers") -local sunflowers_max_count = tonumber(minetest.settings:get("pl_sunflowers_max_count")) or 10 -local sunflowers_rarity = tonumber(minetest.settings:get("pl_sunflowers_rarity")) or 25 - - local box = { type="fixed", fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }, @@ -40,17 +36,20 @@ minetest.register_node(":flowers:sunflower", { } }) -biome_lib.register_on_generate({ - surface = {"default:dirt_with_grass"}, - avoid_nodes = { "flowers:sunflower" }, - max_count = sunflowers_max_count, - rarity = sunflowers_rarity, - min_elevation = 0, - plantlife_limit = -0.9, - temp_max = -0.1, - random_facedir = {0,3}, +minetest.register_decoration({ + decoration = { + "flowers:sunflower" }, - "flowers:sunflower" -) + fill_ratio = 0.005, + y_min = 1, + y_max = 40, + param2 = 0, + param2_max = 3, + place_on = { + "default:dirt_with_grass" + }, + deco_type = "simple", + flags = "all_floors", +}) minetest.register_alias("sunflower:sunflower", "flowers:sunflower") diff --git a/pl_sunflowers/mod.conf b/pl_sunflowers/mod.conf index 1332723..238079e 100644 --- a/pl_sunflowers/mod.conf +++ b/pl_sunflowers/mod.conf @@ -1,3 +1,2 @@ name = pl_sunflowers -depends = biome_lib optional_depends = farming, flowers