Make sure other mods don't override fruits
This commit is contained in:
parent
a6523eda1c
commit
704def8b8d
1 changed files with 23 additions and 20 deletions
3
init.lua
3
init.lua
|
@ -50,6 +50,8 @@ local add_fruit_regrowable = function(fruit, node, leaves)
|
|||
end
|
||||
end
|
||||
|
||||
-- wait until mods are loaded to ensure that other mods do not override overrides
|
||||
minetest.register_on_mods_loaded(function()
|
||||
-- override fruit
|
||||
minetest.override_item(node, {
|
||||
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)
|
||||
|
||||
-- air node to mark fruit pos
|
||||
minetest.register_node("regrowing_fruits:"..fruit.."_mark", {
|
||||
|
|
Loading…
Reference in a new issue