The documentation on minetest.register_on_item_eat() says that overriding the default behavior (healing) can be done if the callback return true but instead it crashes the game, or return an ItemStack but healing occurs nonetheless.
So how to procede to avoid healing using minetest.register_on_item_eat()?
While I will patch most edible items one by one with a code like this (and it works):
- Code: Select all
if minetest.get_modpath("farming") then
minetest.override_item("farming:bread", {
on_use = survival_status.item_eat( { satiation = 8 } )
})
end
... I would like a global behavior approach to avoid keeping track of all farming mods changes.
Any idea?