summaryrefslogtreecommitdiff
path: root/leafdecay.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-06-30 23:55:07 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-06-30 23:55:07 -0400
commitc277590fc2159a6a3599272e8320f600879a75ec (patch)
treecb6b63a8941743447f5b2f236b4c970b4b087646 /leafdecay.lua
parent9e2c0485f4ab9aaab13f7b69c84e39049dd6523b (diff)
Phased out all deprecated minetest.env:* uses in favor of minetest.*
Diffstat (limited to 'leafdecay.lua')
-rw-r--r--leafdecay.lua20
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