It's minetest.item_eat.  Otherwise this seems fine now.