From 0ff0c9274fad9b47dfefc377eb6bb49ea5d196fc Mon Sep 17 00:00:00 2001 From: trans_soup <> Date: Tue, 17 Oct 2023 10:19:27 +0200 Subject: [PATCH] tweak leaves spread chance. --- mods/bg_tree/grow_leaves.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/bg_tree/grow_leaves.lua b/mods/bg_tree/grow_leaves.lua index 14d1d96..51750b4 100644 --- a/mods/bg_tree/grow_leaves.lua +++ b/mods/bg_tree/grow_leaves.lua @@ -10,6 +10,7 @@ local leaves_alive = modname .. ":leaves_alive" local max_grow_distance = 2 +-- TODO: turn this into an increasing ABM. blockgame.register_abm({ label = "grow leaves", nodenames = {leaves_alive}, @@ -24,7 +25,7 @@ blockgame.register_abm({ local neighbors = blockgame.get_neighbors(pos) for _, target in pairs(neighbors) do - if blockgame.chance(6) then + if blockgame.chance(2) then blockgame.attempt_place(target, {name = leaves_alive}) minetest.get_meta(target):set_int("leaf_distance", distance + 1) end