fix leaves growth error.
make growing leaves turn into alive leaves if they should do so. previously, this didn't happen for leaves that exceeded their max distance from supporting node.
This commit is contained in:
parent
584187957a
commit
717cbf91e2
1 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,10 @@ blockgame.register_increasing_abm({
|
|||
-- this requires the API to add support for increasing ABM `action`:s to modify `data`.
|
||||
local meta = minetest.get_meta(pos)
|
||||
local distance = meta:get_int("leaf_distance") or 1
|
||||
if distance >= max_grow_distance then return end
|
||||
if distance >= max_grow_distance then
|
||||
minetest.set_node(pos, {name = leaves_alive})
|
||||
return
|
||||
end
|
||||
|
||||
local sides = blockgame.vector.get_sides_of(pos)
|
||||
for _, target in pairs(sides) do
|
||||
|
|
Loading…
Reference in a new issue