Make sure other mods don't override fruits

This commit is contained in:
philipmi 2022-02-26 17:31:19 +01:00
parent a6523eda1c
commit 704def8b8d

View file

@ -50,6 +50,8 @@ local add_fruit_regrowable = function(fruit, node, leaves)
end end
end end
-- wait until mods are loaded to ensure that other mods do not override overrides
minetest.register_on_mods_loaded(function()
-- override fruit -- override fruit
minetest.override_item(node, { minetest.override_item(node, {
groups = groups, -- make sure (moretrees) fruits don't fall on dig groups = groups, -- make sure (moretrees) fruits don't fall on dig
@ -70,6 +72,7 @@ local add_fruit_regrowable = function(fruit, node, leaves)
end end
end, end,
}) })
end)
-- air node to mark fruit pos -- air node to mark fruit pos
minetest.register_node("regrowing_fruits:"..fruit.."_mark", { minetest.register_node("regrowing_fruits:"..fruit.."_mark", {