From 68504124d72df0d773cb11aa2aa3f7e1b2cb43ba Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 31 Mar 2012 16:37:23 +0300 Subject: [PATCH] Fix leaf decay at borders of the active block area --- mods/default/leafdecay.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/default/leafdecay.lua b/mods/default/leafdecay.lua index a3df9eb7..a01fe616 100644 --- a/mods/default/leafdecay.lua +++ b/mods/default/leafdecay.lua @@ -38,7 +38,8 @@ minetest.register_abm({ if trunkp then local n = minetest.env:get_node(trunkp) local reg = minetest.registered_nodes[n.name] - if reg.groups.tree and reg.groups.tree ~= 0 then + -- Assume ignore is a trunk, to make the thing work at the border of the active area + if n.name == "ignore" or (reg.groups.tree and reg.groups.tree ~= 0) then --print("cached trunk still exists") return end @@ -57,7 +58,8 @@ minetest.register_abm({ } local n = minetest.env:get_node(p) local reg = minetest.registered_nodes[n.name] - if reg.groups.tree and reg.groups.tree ~= 0 then + -- Assume ignore is a trunk, to make the thing work at the border of the active area + if n.name == "ignore" or (reg.groups.tree and reg.groups.tree ~= 0) then do_preserve = true if default.leafdecay_enable_cache then --print("caching trunk")