local flour_recipes = {
   {'food:flour_rice', 'farming:rice'},
   {'food:flour_wheat', 'farming:wheat'},
   {'food:flour_rye', 'farming:rye'},
   {'food:flour_barley', 'farming:barley'},
   {'food:flour_oat', 'farming:oat'},
}

for i in ipairs (flour_recipes) do
   local output = flour_recipes[i][1]
   local input = flour_recipes[i][2]

   minetest.register_craft({
      type = 'shapeless',
      output = output,
      recipe = {
         input, input, input,
         input,
      }
   })
end

minetest.register_craft({
   type = 'shapeless',
   output = 'farming:flour_multigrain',
   recipe = {
      'farming:wheat', 'farming:barley', 'farming:oat',
      'farming:rye',
   }
})

minetest.register_craft({
   type = 'shapeless',
   output = 'food:flour_multigrain',
   recipe = {
      'group:food_flour', 'group:food_flour', 'group:food_flour', 'group:food_flour'
   }
})
