diff options
Diffstat (limited to 'leafdecay.lua')
-rw-r--r-- | leafdecay.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/leafdecay.lua b/leafdecay.lua index 7c75f11..be22ba4 100644 --- a/leafdecay.lua +++ b/leafdecay.lua @@ -9,8 +9,8 @@ if moretrees.enable_leafdecay then interval = moretrees.leafdecay_delay, chance = moretrees.leafdecay_chance, action = function(pos, node, active_object_count, active_object_count_wider) - if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, "moretrees:"..treename.."_trunk") then - minetest.env:remove_node(pos) + if not minetest.find_node_near(pos, moretrees.leafdecay_radius, "moretrees:"..treename.."_trunk") then + minetest.remove_node(pos) nodeupdate(pos) end end @@ -23,8 +23,8 @@ if moretrees.enable_leafdecay then interval = moretrees.leafdecay_delay, chance = moretrees.leafdecay_chance, action = function(pos, node, active_object_count, active_object_count_wider) - if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, {"default:jungletree", "moretrees:jungletree_trunk"}) then - minetest.env:remove_node(pos) + if not minetest.find_node_near(pos, moretrees.leafdecay_radius, {"default:jungletree", "moretrees:jungletree_trunk"}) then + minetest.remove_node(pos) nodeupdate(pos) end end @@ -35,8 +35,8 @@ if moretrees.enable_leafdecay then interval = moretrees.leafdecay_delay, chance = moretrees.leafdecay_chance, action = function(pos, node, active_object_count, active_object_count_wider) - if not minetest.env:find_node_near(pos, moretrees.leafdecay_radius, "moretrees:fir_trunk") then - minetest.env:remove_node(pos) + if not minetest.find_node_near(pos, moretrees.leafdecay_radius, "moretrees:fir_trunk") then + minetest.remove_node(pos) nodeupdate(pos) end end @@ -47,8 +47,8 @@ if moretrees.enable_leafdecay then interval = moretrees.leafdecay_delay, chance = moretrees.leafdecay_chance, action = function(pos, node, active_object_count, active_object_count_wider) - if not minetest.env:find_node_near(pos, moretrees.palm_leafdecay_radius, "moretrees:palm_trunk") then - minetest.env:remove_node(pos) + if not minetest.find_node_near(pos, moretrees.palm_leafdecay_radius, "moretrees:palm_trunk") then + minetest.remove_node(pos) nodeupdate(pos) end end @@ -61,8 +61,8 @@ if moretrees.enable_default_leafdecay then interval = moretrees.default_leafdecay_delay, chance = moretrees.default_leafdecay_chance, action = function(pos, node, active_object_count, active_object_count_wider) - if not minetest.env:find_node_near(pos, moretrees.default_leafdecay_radius, {"default:tree"}) then - minetest.env:remove_node(pos) + if not minetest.find_node_near(pos, moretrees.default_leafdecay_radius, {"default:tree"}) then + minetest.remove_node(pos) nodeupdate(pos) end end |