mirror of
https://github.com/mt-mods/moretrees.git
synced 2025-07-03 16:40:43 +02:00
don't run the decay code on ANY of the default trees
this also disables decaying default trees and default jungletrees with the regular default single color leaves
This commit is contained in:
@ -19,7 +19,7 @@ end
|
||||
if moretrees.enable_leafdecay then
|
||||
for i in ipairs(moretrees.treelist) do
|
||||
local treename = moretrees.treelist[i][1]
|
||||
if treename ~= "jungletree" and treename ~= "fir" and treename ~= "palm" then
|
||||
if treename ~= "jungletree" and treename ~= "pine" and treename ~= acacia and treename ~= "fir" and treename ~= "palm" then
|
||||
minetest.register_abm({
|
||||
nodenames = "moretrees:"..treename.."_leaves",
|
||||
interval = moretrees.leafdecay_delay,
|
||||
@ -71,21 +71,6 @@ if moretrees.enable_leafdecay then
|
||||
})
|
||||
end
|
||||
|
||||
if moretrees.enable_default_leafdecay then
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = "default:leaves",
|
||||
interval = moretrees.default_leafdecay_delay,
|
||||
chance = moretrees.default_leafdecay_chance,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if minetest.find_node_near(pos, moretrees.default_leafdecay_radius, { "ignore", "default:tree" }) then return end
|
||||
process_drops(pos, node.name)
|
||||
minetest.remove_node(pos)
|
||||
nodeupdate(pos)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- Decay apple tree blossoms from nature_classic mod
|
||||
if minetest.get_modpath("nature_classic") then
|
||||
minetest.register_abm({
|
||||
@ -100,18 +85,3 @@ if minetest.get_modpath("nature_classic") then
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
if moretrees.enable_default_jungle_leafdecay then
|
||||
minetest.register_abm({
|
||||
nodenames = "default:jungleleaves",
|
||||
interval = moretrees.default_jungle_leafdecay_delay,
|
||||
chance = moretrees.default_jungle_leafdecay_chance,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
if minetest.find_node_near(pos, moretrees.default_jungle_leafdecay_radius, { "ignore", "default:jungletree" }) then return end
|
||||
process_drops(pos, node.name)
|
||||
minetest.remove_node(pos)
|
||||
nodeupdate(pos)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user