Difference between revisions of "Nutrition"
AceRichman (talk | contribs) (more information, formatted table, removed items not available on pandorabox) |
AceRichman (talk | contribs) (update list of foods) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 27: | Line 27: | ||
|- | |- | ||
| 20 || Meat Block || mobs:meatblock || | | 20 || Meat Block || mobs:meatblock || | ||
+ | |- | ||
+ | | 20 || Raw Meat Block || mobs:meatblock_raw || | ||
|- | |- | ||
| 20 || Super Apple || maptools:superapple || Not obtainable (/giveme only) | | 20 || Super Apple || maptools:superapple || Not obtainable (/giveme only) | ||
Line 77: | Line 79: | ||
|- | |- | ||
| 8 || Melon jam || canned_food:melon_jam || | | 8 || Melon jam || canned_food:melon_jam || | ||
+ | |- | ||
+ | | 8 || Paella || farming:paella || | ||
|- | |- | ||
| 8 || Pumpkin Bread || farming:pumpkin_bread || | | 8 || Pumpkin Bread || farming:pumpkin_bread || | ||
Line 87: | Line 91: | ||
|- | |- | ||
| 8 || Spaghetti || farming:spaghetti || | | 8 || Spaghetti || farming:spaghetti || | ||
+ | |- | ||
+ | | 8 || Spanish Potatoes || farming:spanish_potatoes || | ||
+ | |- | ||
+ | | 8 || Sunflower Seed Bread || farming:sunflower_bread || | ||
+ | |- | ||
+ | | 8 || Tomato Soup || farming:tomato_soup || | ||
|- | |- | ||
| 7 || Apple jam || canned_food:apple_jam || | | 7 || Apple jam || canned_food:apple_jam || | ||
Line 99: | Line 109: | ||
|- | |- | ||
| 6 || Apple Donut || farming:donut_apple || | | 6 || Apple Donut || farming:donut_apple || | ||
− | |||
− | |||
|- | |- | ||
| 6 || Baked Potato || farming:baked_potato || | | 6 || Baked Potato || farming:baked_potato || | ||
|- | |- | ||
| 6 || Beetroot Soup || farming:beetroot_soup || | | 6 || Beetroot Soup || farming:beetroot_soup || | ||
− | |||
− | |||
|- | |- | ||
| 6 || Canned beetroot || canned_food:canned_beetroot || | | 6 || Canned beetroot || canned_food:canned_beetroot || | ||
Line 127: | Line 133: | ||
|- | |- | ||
| 6 || Jaffa Cake || farming:jaffa_cake || Requires rare food to craft (Orange) | | 6 || Jaffa Cake || farming:jaffa_cake || Requires rare food to craft (Orange) | ||
+ | |- | ||
+ | | 6 || Mac & Cheese || farming:mac_and_cheese || | ||
|- | |- | ||
| 6 || Onion Soup || farming:onion_soup || | | 6 || Onion Soup || farming:onion_soup || | ||
Line 132: | Line 140: | ||
| 6 || Porridge || farming:porridge || | | 6 || Porridge || farming:porridge || | ||
|- | |- | ||
− | | 6 || | + | | 6 || Potato omelet || farming:potato_omelet || |
|- | |- | ||
| 6 || Rose petal jam || canned_food:rose_jam || | | 6 || Rose petal jam || canned_food:rose_jam || | ||
|- | |- | ||
− | | 6 || Triple Berry Smoothie || farming:smoothie_berry || Requires rare food to craft ( | + | | 6 || Triple Berry Smoothie || farming:smoothie_berry || Requires rare food to craft (Banana) |
+ | |- | ||
+ | | 6 || Vanilla Flan || farming:flan || | ||
|- | |- | ||
| 5 || Bread || farming:bread || | | 5 || Bread || farming:bread || | ||
Line 147: | Line 157: | ||
|- | |- | ||
| 5 || Corn on the Cob || farming:corn_cob || | | 5 || Corn on the Cob || farming:corn_cob || | ||
+ | |- | ||
+ | | 5 || Glass of Sparkling Apple Juice || wine:glass_sparkling_apple_juice || | ||
|- | |- | ||
| 5 || Rice Bread || farming:rice_bread || | | 5 || Rice Bread || farming:rice_bread || | ||
|- | |- | ||
| 4 || Acorn Muffin || moretrees:acorn_muffin || | | 4 || Acorn Muffin || moretrees:acorn_muffin || | ||
+ | |- | ||
+ | | 4 || Artichoke || farming:artichoke || | ||
|- | |- | ||
| 4 || Carrot Juice || farming:carrot_juice || | | 4 || Carrot Juice || farming:carrot_juice || | ||
Line 169: | Line 183: | ||
|- | |- | ||
| 4 || Glass of Honey-Mead || wine:glass_mead || | | 4 || Glass of Honey-Mead || wine:glass_mead || | ||
+ | |- | ||
+ | | 4 || Glass of Kefir || wine:glass_kefir || | ||
+ | |- | ||
+ | | 4 || Glass of Margarita || wine:glass_margarita || | ||
|- | |- | ||
| 4 || Glass of Mint Julep || wine:glass_mint || | | 4 || Glass of Mint Julep || wine:glass_mint || | ||
+ | |- | ||
+ | | 4 || Glass of Sparkling Agave Juice || wine:glass_sparkling_agave_juice || | ||
+ | |- | ||
+ | | 4 || Glass of Sparkling Blackberry Juice || wine:glass_sparkling_blackberry_juice || | ||
+ | |- | ||
+ | | 4 || Glass of Sparkling Carrot Juice || wine:glass_sparkling_carrot_juice || | ||
+ | |- | ||
+ | | 4 || Gyoza || farming:gyoza || | ||
|- | |- | ||
| 4 || Honey || mobs:honey || | | 4 || Honey || mobs:honey || | ||
|- | |- | ||
− | | 4 || Orange || ethereal:orange || Rare food (obtainable from dungeons) | + | | 4 || Orange || ethereal:orange || Rare food (obtainable from dungeons and Christmas presents) |
|- | |- | ||
| 4 || Pea Soup || farming:pea_soup || | | 4 || Pea Soup || farming:pea_soup || | ||
|- | |- | ||
| 4 || Pineapple Juice || farming:pineapple_juice || | | 4 || Pineapple Juice || farming:pineapple_juice || | ||
+ | |- | ||
+ | | 4 || Popcorn || farming:popcorn || | ||
|- | |- | ||
| 4 || Raw Coconut || moretrees:raw_coconut || | | 4 || Raw Coconut || moretrees:raw_coconut || | ||
Line 195: | Line 223: | ||
|- | |- | ||
| 3 || Corn || farming:corn || | | 3 || Corn || farming:corn || | ||
+ | |- | ||
+ | | 3 || Eggplant || farming:eggplant || | ||
|- | |- | ||
| 3 || Glass of Brandy || wine:glass_brandy || | | 3 || Glass of Brandy || wine:glass_brandy || | ||
|- | |- | ||
| 3 || Glass of Coffee Liquor || wine:glass_coffee_liquor || | | 3 || Glass of Coffee Liquor || wine:glass_coffee_liquor || | ||
+ | |- | ||
+ | | 3 || Mayonnaise || farming:mayonnaise || | ||
+ | |- | ||
+ | | 3 || Mochi || farming:mochi || | ||
|- | |- | ||
| 3 || Raw Meat || mobs:meat_raw || | | 3 || Raw Meat || mobs:meat_raw || | ||
Line 207: | Line 241: | ||
|- | |- | ||
| 3 || Yellow Pepper || farming:pepper_yellow || | | 3 || Yellow Pepper || farming:pepper_yellow || | ||
+ | |- | ||
+ | | 3 || water bottle || home_vending_machines:water_bottle || | ||
|- | |- | ||
| 2 || Apple || default:apple || | | 2 || Apple || default:apple || | ||
Line 213: | Line 249: | ||
|- | |- | ||
| 2 || Banana || ethereal:banana || Rare food (obtainable from Christmas presents) | | 2 || Banana || ethereal:banana || Rare food (obtainable from Christmas presents) | ||
+ | |- | ||
+ | | 2 || Beer Mug || home_workshop_misc:beer_mug || | ||
|- | |- | ||
| 2 || Blue Agave || wine:blue_agave || | | 2 || Blue Agave || wine:blue_agave || | ||
− | |||
− | |||
|- | |- | ||
| 2 || Blueberry Muffin || farming:muffin_blueberry || | | 2 || Blueberry Muffin || farming:muffin_blueberry || | ||
Line 235: | Line 271: | ||
|- | |- | ||
| 2 || Garlic Bread || farming:garlic_bread || | | 2 || Garlic Bread || farming:garlic_bread || | ||
+ | |- | ||
+ | | 2 || Gingerbread Man || farming:gingerbread_man || | ||
|- | |- | ||
| 2 || Glass of Beer || wine:glass_beer || | | 2 || Glass of Beer || wine:glass_beer || | ||
Line 241: | Line 279: | ||
|- | |- | ||
| 2 || Glass of Cider || wine:glass_cider || | | 2 || Glass of Cider || wine:glass_cider || | ||
+ | |- | ||
+ | | 2 || Glass of Cointreau || wine:glass_cointreau || | ||
|- | |- | ||
| 2 || Glass of Milk || mobs:glass_milk || | | 2 || Glass of Milk || mobs:glass_milk || | ||
Line 265: | Line 305: | ||
|- | |- | ||
| 2 || Mint Tea || farming:mint_tea || | | 2 || Mint Tea || farming:mint_tea || | ||
+ | |- | ||
+ | | 2 || Onigiri || farming:onigiri || | ||
|- | |- | ||
| 2 || Pumpkin Slice || farming:pumpkin_slice || | | 2 || Pumpkin Slice || farming:pumpkin_slice || | ||
Line 273: | Line 315: | ||
|- | |- | ||
| 2 || Raw Mutton || mobs:mutton_raw || | | 2 || Raw Mutton || mobs:mutton_raw || | ||
− | |||
− | |||
|- | |- | ||
| 2 || Soy Milk || farming:soy_milk || | | 2 || Soy Milk || farming:soy_milk || | ||
|- | |- | ||
| 2 || Turkish Delight || farming:turkish_delight || | | 2 || Turkish Delight || farming:turkish_delight || | ||
+ | |- | ||
+ | | 2 || Vegan Cheese || farming:cheese_vegan || | ||
+ | |- | ||
+ | | 2 || Wild Blueberries || default:blueberries || Not to be confused with `farming:blueberries` | ||
+ | |- | ||
+ | | 2 || Soda Can || home_vending_machines:soda_can || | ||
+ | |- | ||
+ | | 1 || Apple Pie || farming:apple_pie || | ||
+ | |- | ||
+ | | 1 || Asparagus || farming:asparagus || | ||
|- | |- | ||
| 1 || Beetroot || farming:beetroot || | | 1 || Beetroot || farming:beetroot || | ||
Line 285: | Line 335: | ||
|- | |- | ||
| 1 || Blueberries || farming:blueberries || Not to be confused with `default:blueberries` | | 1 || Blueberries || farming:blueberries || Not to be confused with `default:blueberries` | ||
+ | |- | ||
+ | | 1 || Blueberry Pie || farming:blueberry_pie || | ||
|- | |- | ||
| 1 || Brown Mushroom || flowers:mushroom_brown || | | 1 || Brown Mushroom || flowers:mushroom_brown || | ||
Line 295: | Line 347: | ||
|- | |- | ||
| 1 || Garlic || farming:garlic || | | 1 || Garlic || farming:garlic || | ||
+ | |- | ||
+ | | 1 || Ginger || farming:ginger || | ||
|- | |- | ||
| 1 || Green Beans || farming:beans || | | 1 || Green Beans || farming:beans || | ||
|- | |- | ||
| 1 || Onion || farming:onion || | | 1 || Onion || farming:onion || | ||
+ | |- | ||
+ | | 1 || Pea Pod || farming:pea_pod || | ||
|- | |- | ||
| 1 || Peas || farming:peas || | | 1 || Peas || farming:peas || | ||
Line 307: | Line 363: | ||
|- | |- | ||
| 1 || Raspberries || farming:raspberries || | | 1 || Raspberries || farming:raspberries || | ||
+ | |- | ||
+ | | 1 || Rhubarb Pie || farming:rhubarb_pie || | ||
|- | |- | ||
| 1 || Rhubarb || farming:rhubarb || | | 1 || Rhubarb || farming:rhubarb || | ||
Line 318: | Line 376: | ||
| 1 || Sliced Bread || farming:bread_slice || | | 1 || Sliced Bread || farming:bread_slice || | ||
|- | |- | ||
− | | 1 || | + | | 1 || Spinach || farming:spinach || |
|- | |- | ||
− | | 1 || Strawberry || ethereal:strawberry || | + | | 1 || Strawberry || ethereal:strawberry || |
|- | |- | ||
| 1 || Toast || farming:toast || | | 1 || Toast || farming:toast || | ||
+ | |- | ||
+ | | 1 || Toasted Sunflower Seeds || farming:sunflower_seeds_toasted || | ||
|- | |- | ||
| 1 || Vanilla || farming:vanilla || | | 1 || Vanilla || farming:vanilla || | ||
|- | |- | ||
| -1 || Cactus Juice || farming:cactus_juice || 1/5 chance (4/5 chance to not poison) | | -1 || Cactus Juice || farming:cactus_juice || 1/5 chance (4/5 chance to not poison) | ||
+ | |- | ||
+ | | -1 || Chili Powder || farming:chili_powder || | ||
|- | |- | ||
| -1 || Potato || farming:potato || 1/3 chance (2/3 chance to not poison) | | -1 || Potato || farming:potato || 1/3 chance (2/3 chance to not poison) | ||
+ | |- | ||
+ | | -2 || Soy Beans || farming:soy_beans || | ||
|- | |- | ||
| -5 || Red Mushroom || flowers:mushroom_red || | | -5 || Red Mushroom || flowers:mushroom_red || | ||
Line 342: | Line 406: | ||
<syntaxhighlight lang="Lua"> | <syntaxhighlight lang="Lua"> | ||
− | minetest.register_craftitem( | + | local test_item = ":nutrition:tester" |
− | description = "Food Nutrition | + | minetest.register_craftitem(test_item, { |
− | inventory_image = " | + | description = "Food Nutrition Test Tool", |
+ | inventory_image = "default_stick.png^multiply[#8888FFFF", | ||
on_use = function(itemstack, user, pointed_thing) | on_use = function(itemstack, user, pointed_thing) | ||
− | local items = {} | + | local additional_info = { |
+ | ["maptools:superapple"] = " Not obtainable (/giveme only)", | ||
+ | ["farming:jaffa_cake"] = " Requires rare food to craft (Orange)", | ||
+ | ["farming:smoothie_berry"] = " Requires rare food to craft (Banana)", | ||
+ | ["ethereal:orange"] = " Rare food (obtainable from dungeons and Christmas presents)", | ||
+ | ["ethereal:banana"] = " Rare food (obtainable from Christmas presents)", | ||
+ | ["default:blueberries"] = " Not to be confused with `farming:blueberries`", | ||
+ | ["farming:blueberries"] = " Not to be confused with `default:blueberries`", | ||
+ | } | ||
+ | local chance_dependant = { | ||
+ | ["farming:cactus_juice"] = true, | ||
+ | ["farming:potato"] = true, | ||
+ | } | ||
+ | local items = { | ||
+ | "| -1 || Cactus Juice || farming:cactus_juice || 1/5 chance (4/5 chance to not poison)\n|-", | ||
+ | "| 2 || Cactus Juice || farming:cactus_juice || 4/5 chance (1/5 chance to poison)\n|-", | ||
+ | "| -1 || Potato || farming:potato || 1/3 chance (2/3 chance to not poison)\n|-", | ||
+ | "| 1 || Potato || farming:potato || 2/3 chance (1/3 chance to poison)\n|-", | ||
+ | } | ||
-- Override do_item_eat function | -- Override do_item_eat function | ||
local old_do_eat = minetest.do_item_eat | local old_do_eat = minetest.do_item_eat | ||
Line 352: | Line 435: | ||
local item = itemstack:get_name() | local item = itemstack:get_name() | ||
local desc = minetest.registered_items[item].description or "" | local desc = minetest.registered_items[item].description or "" | ||
− | if desc ~= "" then | + | local info = additional_info[item] or "" |
− | + | if not chance_dependant[item] then | |
+ | if desc ~= "" then | ||
+ | desc = minetest.get_translated_string("", desc) .. " " | ||
+ | end | ||
+ | items[#items+1] = "| " .. hp_change .. " || " .. desc .. "|| " | ||
+ | .. item .. " ||" .. info .. "\n|-" | ||
end | end | ||
− | |||
end | end | ||
-- Run on_use callback for all registered items | -- Run on_use callback for all registered items | ||
for k,v in pairs(minetest.registered_items) do | for k,v in pairs(minetest.registered_items) do | ||
− | if k ~= | + | if k ~= test_item and type(v.on_use) == "function" then |
v.on_use(ItemStack(k), user, pointed_thing) | v.on_use(ItemStack(k), user, pointed_thing) | ||
end | end | ||
Line 365: | Line 452: | ||
-- Sort items by nutrition value, then by name | -- Sort items by nutrition value, then by name | ||
table.sort(items, function(a, b) | table.sort(items, function(a, b) | ||
− | local na = tonumber(a:split(" ")[ | + | local na = tonumber(a:split(" ")[2]) |
− | local nb = tonumber(b:split(" ")[ | + | local nb = tonumber(b:split(" ")[2]) |
if na ~= nb then | if na ~= nb then | ||
return nb < na | return nb < na |
Latest revision as of 08:38, 6 February 2024
About nutrition and stamina
Nutrition refers to how much a food can feed or poison a player, and stamina refers to the value stored in the player, as displayed on the HUD. These terms can also be known as hunger points, food points, stamina points, hunger, or bread.
A positive nutrition value feeds the player, while a negative value poisons the player. The maximum usable nutrition is 20, and the minimum is -20 (poison), anything outside of this range is wasted (for example, Date-nut cake will only give a maximum of 20 stamina, even though it has 32 nutrition).
The stamina HUD (row of bread icons) displays 20 half-loaves of bread (10 full loafs). To calculate how many bread icons are filled up on the HUD when eating an item, divide the nutrition by 2.
Full list of foods
Nutrition | Name | Itemstring | Comment |
---|---|---|---|
32 | Date-nut cake | moretrees:date_nut_cake | |
30 | Marinated tomatoes | canned_food:canned_tomato_plus | |
30 | Pickled carrot sticks | canned_food:canned_carrot_plus | |
30 | Pickles | canned_food:canned_cucumber_plus | |
21 | A jar of honey | canned_food:honey_jar | |
20 | Meat Block | mobs:meatblock | |
20 | Raw Meat Block | mobs:meatblock_raw | |
20 | Super Apple | maptools:superapple | Not obtainable (/giveme only) |
16 | Burger | farming:burger | |
15 | Canned carrots | canned_food:canned_carrot | |
15 | Canned cucumbers | canned_food:canned_cucumber | |
15 | Canned tomatoes | canned_food:canned_tomato | |
15 | Wild blueberry jam | canned_food:wild_blueberry_jam | |
14 | Pickled chili pepper | canned_food:canned_chili_pepper_plus | |
12 | Mexican pickled potatoes | canned_food:canned_potato_plus | |
12 | Pickled beetroot | canned_food:canned_beetroot_plus | |
12 | Salted mushrooms | canned_food:canned_mushrooms_plus | |
11 | Canned corn | canned_food:canned_corn | |
11 | Grape jam | canned_food:grape_jam | |
10 | Canned peas | canned_food:canned_peas | |
10 | Cucumber and Potato Salad | farming:potato_salad | |
10 | Golden Carrot | farming:carrot_gold | |
10 | Pickled garlic cloves | canned_food:canned_garlic_cloves_plus | |
10 | Pickled onions | canned_food:canned_onion_plus | |
8 | Bibimbap | farming:bibimbap | |
8 | Blackberry jam | canned_food:blackberry_jam | |
8 | Blueberry jam | canned_food:blueberry_jam | |
8 | Bowl of Chili | farming:chili_bowl | |
8 | Bucket of Milk | mobs:bucket_milk | |
8 | Cooked Porkchop | mobs:pork_cooked | |
8 | Meat | mobs:meat | |
8 | Melon jam | canned_food:melon_jam | |
8 | Paella | farming:paella | |
8 | Pumpkin Bread | farming:pumpkin_bread | |
8 | Raspberry jam | canned_food:raspberry_jam | |
8 | Rhubarb jam | canned_food:rhubarb_jam | |
8 | Salad | farming:salad | |
8 | Spaghetti | farming:spaghetti | |
8 | Spanish Potatoes | farming:spanish_potatoes | |
8 | Sunflower Seed Bread | farming:sunflower_bread | |
8 | Tomato Soup | farming:tomato_soup | |
7 | Apple jam | canned_food:apple_jam | |
7 | Canned beans | canned_food:canned_beans | |
7 | Canned chili pepper | canned_food:canned_chili_pepper | |
7 | Canned pumpkin puree | canned_food:canned_pumpkin | |
7 | Multigrain Bread | farming:bread_multigrain | |
6 | Apple Donut | farming:donut_apple | |
6 | Baked Potato | farming:baked_potato | |
6 | Beetroot Soup | farming:beetroot_soup | |
6 | Canned beetroot | canned_food:canned_beetroot | |
6 | Canned mushrooms | canned_food:canned_mushrooms | |
6 | Canned pineapple rings | canned_food:canned_pineapple | |
6 | Canned potatoes | canned_food:canned_potato | |
6 | Chocolate Donut | farming:donut_chocolate | |
6 | Cooked Chicken | mobs:chicken_cooked | |
6 | Cooked Mutton | mobs:mutton_cooked | |
6 | Cooked Tofu | farming:tofu_cooked | |
6 | Dandelion jam | canned_food:dandelion_jam | |
6 | Jaffa Cake | farming:jaffa_cake | Requires rare food to craft (Orange) |
6 | Mac & Cheese | farming:mac_and_cheese | |
6 | Onion Soup | farming:onion_soup | |
6 | Porridge | farming:porridge | |
6 | Potato omelet | farming:potato_omelet | |
6 | Rose petal jam | canned_food:rose_jam | |
6 | Triple Berry Smoothie | farming:smoothie_berry | Requires rare food to craft (Banana) |
6 | Vanilla Flan | farming:flan | |
5 | Bread | farming:bread | |
5 | Canned garlic cloves | canned_food:canned_garlic_cloves | |
5 | Canned onions | canned_food:canned_onion | |
5 | Cooked Rabbit | mobs:rabbit_cooked | |
5 | Corn on the Cob | farming:corn_cob | |
5 | Glass of Sparkling Apple Juice | wine:glass_sparkling_apple_juice | |
5 | Rice Bread | farming:rice_bread | |
4 | Acorn Muffin | moretrees:acorn_muffin | |
4 | Artichoke | farming:artichoke | |
4 | Carrot Juice | farming:carrot_juice | |
4 | Carrot | farming:carrot | |
4 | Cheese | mobs:cheese | |
4 | Cucumber | farming:cucumber | |
4 | Date & nut snack | moretrees:date_nut_snack | |
4 | Date-nut energy bar | moretrees:date_nut_bar | |
4 | Donut | farming:donut | |
4 | Glass of Champagne | wine:glass_champagne | |
4 | Glass of Honey-Mead | wine:glass_mead | |
4 | Glass of Kefir | wine:glass_kefir | |
4 | Glass of Margarita | wine:glass_margarita | |
4 | Glass of Mint Julep | wine:glass_mint | |
4 | Glass of Sparkling Agave Juice | wine:glass_sparkling_agave_juice | |
4 | Glass of Sparkling Blackberry Juice | wine:glass_sparkling_blackberry_juice | |
4 | Glass of Sparkling Carrot Juice | wine:glass_sparkling_carrot_juice | |
4 | Gyoza | farming:gyoza | |
4 | Honey | mobs:honey | |
4 | Orange | ethereal:orange | Rare food (obtainable from dungeons and Christmas presents) |
4 | Pea Soup | farming:pea_soup | |
4 | Pineapple Juice | farming:pineapple_juice | |
4 | Popcorn | farming:popcorn | |
4 | Raw Coconut | moretrees:raw_coconut | |
4 | Raw Porkchop | mobs:pork_raw | |
4 | Red Pepper | farming:pepper_red | |
4 | Toast Sandwich | farming:toast_sandwich | |
4 | Tomato | farming:tomato | |
3 | Bar of Dark Chocolate | farming:chocolate_dark | |
3 | Cooked Rat | mobs:rat_cooked | |
3 | Corn | farming:corn | |
3 | Eggplant | farming:eggplant | |
3 | Glass of Brandy | wine:glass_brandy | |
3 | Glass of Coffee Liquor | wine:glass_coffee_liquor | |
3 | Mayonnaise | farming:mayonnaise | |
3 | Mochi | farming:mochi | |
3 | Raw Meat | mobs:meat_raw | |
3 | Raw Rabbit | mobs:rabbit_raw | |
3 | Tofu | farming:tofu | |
3 | Yellow Pepper | farming:pepper_yellow | |
3 | water bottle | home_vending_machines:water_bottle | |
2 | Apple | default:apple | |
2 | Bamboo Sprout | bamboo:sprout | |
2 | Banana | ethereal:banana | Rare food (obtainable from Christmas presents) |
2 | Beer Mug | home_workshop_misc:beer_mug | |
2 | Blue Agave | wine:blue_agave | |
2 | Blueberry Muffin | farming:muffin_blueberry | |
2 | Cactus Juice | farming:cactus_juice | 4/5 chance (1/5 chance to poison) |
2 | Cherries | cherrytree:cherries | |
2 | Chili Pepper | farming:chili_pepper | |
2 | Coconut Milk | moretrees:coconut_milk | |
2 | Cookie | farming:cookie | |
2 | Cup of Coffee | farming:coffee_cup | |
2 | Fried Egg | mobs:chicken_egg_fried | |
2 | Garlic Bread | farming:garlic_bread | |
2 | Gingerbread Man | farming:gingerbread_man | |
2 | Glass of Beer | wine:glass_beer | |
2 | Glass of Bourbon | wine:glass_bourbon | |
2 | Glass of Cider | wine:glass_cider | |
2 | Glass of Cointreau | wine:glass_cointreau | |
2 | Glass of Milk | mobs:glass_milk | |
2 | Glass of Rum | wine:glass_rum | |
2 | Glass of Sake | wine:glass_sake | |
2 | Glass of Tequila | wine:glass_tequila | |
2 | Glass of Vodka | wine:glass_vodka | |
2 | Glass of Wheat Beer | wine:glass_wheat_beer | |
2 | Glass of Wine | wine:glass_wine | |
2 | Grapes | farming:grapes | |
2 | Green Pepper | farming:pepper | |
2 | Lettuce | farming:lettuce | |
2 | Melon Slice | farming:melon_slice | |
2 | Mint Tea | farming:mint_tea | |
2 | Onigiri | farming:onigiri | |
2 | Pumpkin Slice | farming:pumpkin_slice | |
2 | Raspberry Smoothie | farming:smoothie_raspberry | |
2 | Raw Chicken | mobs:chicken_raw | |
2 | Raw Mutton | mobs:mutton_raw | |
2 | Soy Milk | farming:soy_milk | |
2 | Turkish Delight | farming:turkish_delight | |
2 | Vegan Cheese | farming:cheese_vegan | |
2 | Wild Blueberries | default:blueberries | Not to be confused with `farming:blueberries` |
2 | Soda Can | home_vending_machines:soda_can | |
1 | Apple Pie | farming:apple_pie | |
1 | Asparagus | farming:asparagus | |
1 | Beetroot | farming:beetroot | |
1 | Blackberries | farming:blackberry | |
1 | Blueberries | farming:blueberries | Not to be confused with `default:blueberries` |
1 | Blueberry Pie | farming:blueberry_pie | |
1 | Brown Mushroom | flowers:mushroom_brown | |
1 | Butter | mobs:butter | |
1 | Cabbage | farming:cabbage | |
1 | Date | moretrees:date | |
1 | Garlic | farming:garlic | |
1 | Ginger | farming:ginger | |
1 | Green Beans | farming:beans | |
1 | Onion | farming:onion | |
1 | Pea Pod | farming:pea_pod | |
1 | Peas | farming:peas | |
1 | Pineapple Ring | farming:pineapple_ring | |
1 | Potato | farming:potato | 2/3 chance (1/3 chance to poison) |
1 | Raspberries | farming:raspberries | |
1 | Rhubarb Pie | farming:rhubarb_pie | |
1 | Rhubarb | farming:rhubarb | |
1 | Roasted Cedar Cone Nuts | moretrees:cedar_nuts | |
1 | Roasted Fir Cone Nuts | moretrees:fir_nuts | |
1 | Roasted Spruce Cone Nuts | moretrees:spruce_nuts | |
1 | Sliced Bread | farming:bread_slice | |
1 | Spinach | farming:spinach | |
1 | Strawberry | ethereal:strawberry | |
1 | Toast | farming:toast | |
1 | Toasted Sunflower Seeds | farming:sunflower_seeds_toasted | |
1 | Vanilla | farming:vanilla | |
-1 | Cactus Juice | farming:cactus_juice | 1/5 chance (4/5 chance to not poison) |
-1 | Chili Powder | farming:chili_powder | |
-1 | Potato | farming:potato | 1/3 chance (2/3 chance to not poison) |
-2 | Soy Beans | farming:soy_beans | |
-5 | Red Mushroom | flowers:mushroom_red |
How this list was created
The information in the above list was gathered by adding a testing tool using the code below. The testing tool was then used in a world containing every mod that is used on Pandorabox, including the default mods in Minetest Game.
For Cactus Juice and Potato, the data was extracted from the mod code manually.
local test_item = ":nutrition:tester"
minetest.register_craftitem(test_item, {
description = "Food Nutrition Test Tool",
inventory_image = "default_stick.png^multiply[#8888FFFF",
on_use = function(itemstack, user, pointed_thing)
local additional_info = {
["maptools:superapple"] = " Not obtainable (/giveme only)",
["farming:jaffa_cake"] = " Requires rare food to craft (Orange)",
["farming:smoothie_berry"] = " Requires rare food to craft (Banana)",
["ethereal:orange"] = " Rare food (obtainable from dungeons and Christmas presents)",
["ethereal:banana"] = " Rare food (obtainable from Christmas presents)",
["default:blueberries"] = " Not to be confused with `farming:blueberries`",
["farming:blueberries"] = " Not to be confused with `default:blueberries`",
}
local chance_dependant = {
["farming:cactus_juice"] = true,
["farming:potato"] = true,
}
local items = {
"| -1 || Cactus Juice || farming:cactus_juice || 1/5 chance (4/5 chance to not poison)\n|-",
"| 2 || Cactus Juice || farming:cactus_juice || 4/5 chance (1/5 chance to poison)\n|-",
"| -1 || Potato || farming:potato || 1/3 chance (2/3 chance to not poison)\n|-",
"| 1 || Potato || farming:potato || 2/3 chance (1/3 chance to poison)\n|-",
}
-- Override do_item_eat function
local old_do_eat = minetest.do_item_eat
minetest.do_item_eat = function(hp_change, replace_with_item, itemstack, player, pointed_thing)
local item = itemstack:get_name()
local desc = minetest.registered_items[item].description or ""
local info = additional_info[item] or ""
if not chance_dependant[item] then
if desc ~= "" then
desc = minetest.get_translated_string("", desc) .. " "
end
items[#items+1] = "| " .. hp_change .. " || " .. desc .. "|| "
.. item .. " ||" .. info .. "\n|-"
end
end
-- Run on_use callback for all registered items
for k,v in pairs(minetest.registered_items) do
if k ~= test_item and type(v.on_use) == "function" then
v.on_use(ItemStack(k), user, pointed_thing)
end
end
-- Sort items by nutrition value, then by name
table.sort(items, function(a, b)
local na = tonumber(a:split(" ")[2])
local nb = tonumber(b:split(" ")[2])
if na ~= nb then
return nb < na
end
return a < b
end)
-- Output results
for _,v in ipairs(items) do
print(v)
end
-- Undo override
minetest.do_item_eat = old_do_eat
end
})