Favorite food
| Type | Trading mechanic |
|---|
A villager's favorite food is a trade mechanic added in 1.12.3: every employed villager gets one extra trade after its first trade, in which it buys a randomly chosen food (usually one serving) for an Obol. The trade can be used once before the villager restocks. It is the only way to sell most of the pack's foods.
Mechanics
When the data pack loads, it starts a check that runs 3 seconds later and then every 30 seconds.[1][2] Each check looks at every loaded villager that:
- has a profession other than none or, since 1.12.8-beta, Fisherman, and
- has more than 0 villager experience, meaning the player has traded with it at least once, and
- has not been given a favorite food yet.
For each such villager, the pack picks a random whole number from 0 to 41 and runs the matching one of 42 food functions.[3] The number is passed to the function name through a macro, food_trades/food_$(num).[4] That function appends one offer to the end of the villager's trade list and tags the villager so it is never picked again:[5]
| Villager wants | Villager gives | Uses |
|---|---|---|
| The favorite food (1, or more for a few foods; see #Foods) | 1 |
1 |
Every one of the 42 foods has the same 1 in 42 chance. The food in the trade carries the full item data of the pack's current version of that food, so it has to be a food made or found in the current version; older copies with a different format do not match.
Because the check needs the villager to have experience, the favorite food appears only after the first trade with a villager, and never on an unemployed villager, a nitwit or a fisherman. A fisherman that got one before 1.12.8-beta keeps it. The favorite food is a villager trade only; the Wandering Trader does not get one.
An Amnestic clears the villager's favorite food flag and sets its experience back to 0, so the new favorite food appears only after the first trade in the new profession.[6][7]
Foods
| # | Food | Amount |
|---|---|---|
| 0 | 1 | |
| 1 | 1 | |
| 2 | 8 | |
| 3 | 1 | |
| 4 | 1 | |
| 5 | 1 | |
| 6 | 1 | |
| 7 | 1 | |
| 8 | 1 | |
| 9 | 1 | |
| 10 | 1 | |
| 11 | 1 | |
| 12 | 1 | |
| 13 | 1 | |
| 14 | 1 | |
| 15 | 1 | |
| 16 | 1 | |
| 17 | 1 | |
| 18 | 1 | |
| 19 | 1 | |
| 20 | 1 | |
| 21 | 1 | |
| 22 | 1 | |
| 23 | 1 | |
| 24 | 1 | |
| 25 | 1 | |
| 26 | 1 | |
| 27 | 8 | |
| 28 | 4 | |
| 29 | 1 | |
| 30 | 1 | |
| 31 | 8 | |
| 32 | 1 | |
| 33 | 1 | |
| 34 | 8 | |
| 35 | 1 | |
| 36 | 1 | |
| 37 | 3 | |
| 38 | 1 | |
| 39 | 1 | |
| 40 | 1 | |
| 41 | 1 |
All 42 foods sell for 1 obol, including the curries and ramen, which take the most steps to cook. Most are bought one at a time, but the four chicken nuggets are bought 8 at a time, the puerquito 4 and the honey ginger tea 3.[8][9][10]
History
| 1.12.3 | Added: every employed villager that has been traded with buys one random food, once. The villager wants 1 of the food, and an Amnestic gives it a new favorite. |
|---|---|
| 1.12.6-alpha | The four chicken nuggets are bought 8 at a time, the puerquito 4 and the honey ginger tea 3. The toadstool stroganoff trade asked for an item with a misspelled name key, which no toadstool stroganoff has, and now asks for the real one. The Amnestic sets the villager's experience back to 0, so a new favorite appears only after a trade.[11] |
| 1.12.7-beta | Every favorite food trade is limited to one use before restocking. From 1.12.3 to 1.12.6-alpha, all but the apple empanada's trade wrote the limit under a key the game ignores (max_uses instead of maxUses), so the limit of 1 didn't apply; the release notes call it a bug "that resulted in high restock rates".[12][13]
|
| 1.12.8-beta October 23, 2026 |
Fishermen no longer get a favorite food.[14] |
The favorite food was contributed by TankyAibem (pull request #193), as a rework of the "local flavors" add-on. It was merged into the repository's main branch about an hour and a half after 1.12.2-beta was published on Modrinth and is part of 1.12.3.[15]
Trivia
- The functions and tags use the internal names
favorite_food,trader_updateandfoodChecked. - The favorite food trade is added with a data command rather than through the pack's trade sets, which is why it does not appear on the profession pages' trade tables.
See also
References
- ↑
favorite food/favorite food setup.mcfunction - ↑
favorite food/trader update init.mcfunction - ↑
favorite food/trader update.mcfunction - ↑
favorite food/trader update macro.mcfunction - ↑
food trades/food 0.mcfunction - ↑
amnestic/villager consumed.mcfunction - ↑
favorite food/trader update init.mcfunction - ↑
food trades/food 2.mcfunction - ↑
food trades/food 28.mcfunction - ↑
food trades/food 37.mcfunction - ↑
food trades/food 30.mcfunction - ↑
food trades/food 1.mcfunction - ↑ Matcha Flavoured 1.12.7-beta release notes: "Villager trade favourite foods had a bug that resulted in high restock rates"
- ↑
favorite food/trader update init.mcfunction - ↑ Merge of pull request #193 (2026-09-19 04:50 UTC; the beta was published at 03:20 UTC)
| Mechanics | |
|---|---|
| Professions |
|
| Wandering Trader | |
| Traded goods | |
| Sacred texts | |
| Livestock | |
| Miscellaneous | |