local breads = {
   {'Banana', 'banana', 5},
   {'Barley', 'barley', 4},
   {'Corn', 'corn', 5},
   {'Multigrain', 'multigrain', 6},
   {'Oat', 'oat', 5},
   {'Pumpkin', 'pumpkin', 6},
   {'Rice', 'rice', 5},
   {'Rye', 'rye', 5},
   {'Wheat', 'wheat', 5},
}

for i in ipairs (breads) do
   local name = breads[i][1]
   local internal = breads[i][2]
   local hunger = breads[i][3]

   minetest.register_craftitem('food:bread_'..internal..'_dough', {
      description = (name..' Bread Dough'),
      inventory_image = 'food_bread_'..internal..'_dough.png',
   })

   minetest.register_craftitem('food:bread_'..internal, {
      description = (name..' Bread'),
      inventory_image = 'food_bread_'..internal..'.png',
      on_use = minetest.item_eat(hunger)
   })

   --hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
   hbhunger.register_food('food:bread_'..internal, hunger)
end
