tweak leaves spread chance.

This commit is contained in:
trans_soup 2023-10-17 10:19:27 +02:00
parent 790e00ef5c
commit 0ff0c9274f
1 changed files with 2 additions and 1 deletions

View File

@ -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