From f02b9d4e47c78bbec310786c9c7223a8ddb2bd3d Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Sun, 23 Oct 2022 15:58:15 -0400 Subject: [PATCH] tune spawning to be better --- biome_defs.lua | 9 ++++++++- init.lua | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/biome_defs.lua b/biome_defs.lua index e54f7ba..7619abb 100644 --- a/biome_defs.lua +++ b/biome_defs.lua @@ -69,6 +69,9 @@ moretrees.apple_tree_biome = { temp_max = -0.15, rarity = 75, max_count = 5, + place_on = {"default:dirt_with_grass"}, + biomes = {"deciduous_forest"}, + fill_ratio = 0.0001, } moretrees.oak_biome = { @@ -82,6 +85,7 @@ moretrees.oak_biome = { temp_max = 0.2, rarity = 50, max_count = 5, + fill_ratio = 0.0003 } moretrees.sequoia_biome = { @@ -95,6 +99,7 @@ moretrees.sequoia_biome = { temp_max = -0.4, rarity = 90, max_count = 5, + fill_ratio = 0.0001, } moretrees.birch_biome = { @@ -145,7 +150,8 @@ moretrees.jungletree_biome = { "default:dirt_with_grass", "woodsoils:dirt_with_leaves_1", "woodsoils:grass_with_leaves_1", - "woodsoils:grass_with_leaves_2" + "woodsoils:grass_with_leaves_2", + "default:dirt_with_rainforest_litter", }, avoid_nodes = {"moretrees:jungletree_trunk"}, max_count = 12, @@ -158,6 +164,7 @@ moretrees.jungletree_biome = { near_nodes_vertical = 2, near_nodes_count = 1, plantlife_limit = -0.9, + biomes = {"rainforest", "rainforest_swamp"}, } moretrees.spruce_biome = { diff --git a/init.lua b/init.lua index 7b4f01f..71917aa 100644 --- a/init.lua +++ b/init.lua @@ -119,9 +119,9 @@ function translate_biome_defs(def, treename, index) local deco_def = { name = treename .. "_" .. index, deco_type = "simple", - place_on = def.surface, + place_on = def.place_on or def.surface, sidelen = 16, - fill_ratio = 0.02, + fill_ratio = def.fill_ratio or 0.005, --biomes eventually? y_min = def.min_elevation, y_max = def.max_elevation, @@ -220,7 +220,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed) --minetest.chat_send_all("yay") local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z}) timer:start(math.random(2,10)) - minetest.set_node(pos, {name="default:stone"}) + --minetest.set_node(pos, {name="default:stone"}) end end)