Villagers preoccupied with trading carrots
At times, villagers become preoccupied with trading carrots (or, presumably, other crops). They form clusters and repeatedly throw them at each other, only to throw them back again. The attached video shows this happening in a particular desert village that has 13 villagers, 12 of them farmers. On several occasions I have seen 12 of the 13 engaged in this pointless activity.
Thinking that their inventories were full, I checked with an NBT editor. The 4 villagers in this video each had from 3 to 6 carrots in its inventory, two of them had 3 and 5 carrots in their main hands, and all had 3 or 4 empty slots, so that wasn't why they were swapping. Note that I have also seen these villagers walking around with carrots in their main hands when they weren't engaged in swapping. It makes me wonder whether their AI doesn't allow them to have more than a small number of carrots in their inventories. Each swap might then exceed the recipient's limit, causing the behavior to repeat without limit.
Linked Issues
is duplicated by1
Created Issue:
Villagers preoccupied with trading carrots
At times, villagers become preoccupied with trading carrots (or, presumably, other crops). They form clusters and repeatedly throw them at each other, only to throw them back again. The attached video shows this happening in a particular desert village that has 13 villagers, 12 of them farmers. On several occasions I have seen 12 of the 13 engaged in this pointless activity.
Thinking that their inventories were full, I checked with an NBT editor. The 4 villagers in this video each had from 3 to 6 carrots in its inventory, two of them had 3 and 5 carrots in their main hands, and all had 3 or 4 empty slots, so that wasn't why they were swapping. Note that I have also seen these villagers walking around with carrots in their main hands when they weren't engaged in swapping. It makes me wonder whether their AI doesn't allow them to have more than a small number of carrots in their inventories. Each swap might then exceed the recipient's limit, causing the behavior to repeat without limit.
is duplicated by
This bug is fixed in the current beta version, and the fix will be included in a future release. No exact date can be given.
Earlier, this ticket was closed as a duplicate of MCPE-47166, which reports that a farmer who is holding 4 or more bread does not harvest any crops. That issue could be involved in some of these issues, but I started by assuming it isn't.
Villager behaviors have changed since this report was created, and comments have added additional symptoms in 1.11, so I decided to assess which issues are still current. Here's the list of what I found:
- Farmers share a few potatoes at first but then stop. This is different from how they work with carrots.
- Farmers only harvest occasionally and only a small amount.
- Farmers don't harvest potatoes at all.
- Farmers will share potatoes they're given, but not those they harvest themselves.
- Farmers no longer drop excess seeds on the ground. (I was a little confused whether this was meant as an issue or just an observation.)
- Farmers stare at seeds in fields they can't get to, and at seeds they can't even see through opaque blocks.
These issues fall into two groups: Farming and Sharing. Although they're mutually dependent behaviors, these are very different game mechanics and I will treat them separately.
Issue #1: Farmers share a few potatoes at first but then stop. This is different from how they work with carrots
Farmers share carrots and potatoes differently because they have different thresholds defined for them in the vanilla behavior pack. The threshold, called "surplus_amount", is only 4 for carrots but 24 for potatoes. When a peasant villager (which includes farmers) has more than surplus_amount of a food item, it will offer some of what is has to a villager it encounters while strolling randomly. The behavior pack also defines a limit, called "want_amount", that specifies how many of each kind of food a villager wants to have. The donor villager will only drop, at most, enough food to let the receiving villager reach its want_amount. Together, these parameters determine how often and how much food a farmer will share. Since the threshold is much lower for carrots, the farmer will be willing to give carrots even when it only has a few, which it can quickly replenish, whereas it needs to have quite a lot of potatoes before it offers any, and then it takes correspondingly longer to replenish its own supply. (It might seem as if the way carrots work is better and should be implemented for potatoes, but see MCPE-32627 for a problem it causes.)
That leaves the question of why it completely stops sharing. At this time, I don't believe it actually does stop. When I experiment with this, if I give a bunch of potatoes to a farmer who seems to have stopped, it shares them as it ought to. That tells me that the apparent unwillingness to share is a consequence of the real problem, which is unwillingness to harvest. For that, see issue #3.
These behavior pack parameters have been unchanged since at least 1.1 (the earliest release I have a behavior pack for). However, it may be that the new villagers use them differently than the old ones did, and this could cause the reported issue. But at this time, issue #3 is causing at least some part of this problem, so we'll need to see whether the problem persists after that one is fixed.
Issue #2: Farmers only harvest occasionally and only a small amount
That farmers only harvest occasionally is part of the new villager behavior. Harvesting is an activity that farmers perform as part of their work schedule. During their work hours (5000-8000 ticks and 10000-11000 ticks), they alternate between "working" (standing at their job site) and a cooldown period during which they perform their other assignments, including harvesting and sowing, taking a random stroll, and exploring the village's outskirts. On average, the "working" periods last about 25 seconds while the cooldowns last about 20, not enough time to harvest and sow an entire crop field. So this behavior is intentional. I don't see it as being an issue, as long as they keep doing it often enough to keep the village fed. Feel free to comment with a rebuttal if you disagree.
Issue #3: Farmers don't harvest potatoes at all
This just isn't true as a general statement. They may not harvest potatoes in some situations, but to report it as a bug we need to tell the developers what some of those situations are.
So I did some experiments and found one. In a world with a farmer and a butcher, both with empty inventories, I planted 8 potato plants. After they matured, the farmer only harvested 6 plants, collecting 12 potatoes, and then stopped harvesting. I tried again without the butcher, This time the farmer harvested 6 plants and stopped, but a short time later it harvested 2 more plants. Checking, I found it again had 12 potatoes. So it appears that a farmer will stop harvesting potatoes when it has 12. Its surplus_amount is 24, so this means that a farmer cannot harvest enough potatoes to enable it share them with any villagers. This definitely seems like a bug.
Issue #4: Farmers will share potatoes they're given, but not those they harvest themselves
This is a corollary to #3. Since they only harvest 12, which is not enough to reach their surplus_amount, they will not share them. Likewise, they will not share the next 12 you give them, but any you give them after that will allow them to share. It's a not difference between potatoes you've given them versus those they harvest themselves, though, so this issue is a red herring.
Issue #5: Farmers no longer drop excess seeds on the ground
I don't think they ever did. I think what you observed was a farmer sharing surplus seeds with another villager, a peasant. Like non-peasants, peasant villagers share bread, carrots, potatoes, and beetroot, but unlike non-peasants they can also share wheat seeds and beetroot seeds. This seems to be a holdover from the old villagers, where all peasants wore brown coats and shared farming behaviors with farmers, but since non-farmer peasants don't sow or harvest any more, its modern purpose is questionable. The only reason I can think for this behavior to still exist is to serve as a seed reservoir in case the crops and farmers are all destroyed (for instance, by a series of unfortunate events, like a raid followed by a zombie siege and players plundering their crops). If they can make a baby and it grows up to become a farmer, the other peasants will share their seeds with it and the village will have a chance to revive.
Issue #6: Farmers stare at seeds in fields they can't get to, and at seeds they can't even see through opaque blocks
Farmers don't claim individual plots. Even in old converted villages, where if they don't have a composter farmers treat farmland as their job site, a farmer considers it his job to farm every farmland block in the village. In fact, the seeds aren't even part of what you saw. A farmer (or any other peasant) will pick up seeds it happens to walk close to, but it doesn't go searching for them. So I'm pretty sure what you saw was a farmer trying to sow or harvest in the field the seeds were in.
With respect to being able to see its target farmland through an opaque block, I believe that works as intended. If a farmer couldn't detect a field lying on the other side of a building, it might take a long time for it to wander somewhere where it could see it, and then it wouldn't be able to see the fields on the side it came from any more. This would tend to leave some farmland underutilized, so you'd need more farmland to maintain the same food supply.
In summary, the only clear issue I can identify on this ticket that is still an issue in 1.11 is #3. I will update the description field and attach a test world for the developers. If anyone thinks my explanations for the other issues are incomplete or wrong, I invite you to comment and I'll reconsider.
Note: The average durations I stated above for farmers "working" versus doing other things are double the correct values. They should be 12.5 and 10 seconds, respectively.
The sharing parameters don't change. What's supposed to happen is that villagers consume or give away food, which puts them below their want_amount again, and then the farmer can give them more food if it has any. The only time villagers actually consume food, as far as I know, is when they make babies, but there could be other ways (e.g. maybe to regenerate health?).
Here are the actual sharing parameters from the vanilla behavior pack:
Peasant:
| Food Item | want_amount | surplus_amount |
|---|---|---|
| bread | 3 | 6 |
| carrot | 60 | 4 |
| potato | 60 | 24 |
| beetroot | 60 | 24 |
| wheat_seeds | 64 | 64 |
| beetroot_seeds | 64 | 64 |
| wheat | 45 | 18 |
Non-Peasant:
| Food Item | want_amount | surplus_amount |
|---|---|---|
| bread | 3 | 6 |
| carrot | 12 | 24 |
| potato | 12 | 24 |
| beetroot | 12 | 24 |
As you can see, the parameters are always the same for potatoes and beetroot. Carrots are the same as those two except that for peasants, the surplus_amount is 4 instead of 24. (This is reported as a bug in MCPE-32627.)
Now for the important news: I hadn't previously tested a beetroot farm because it was the one crop you said worked perfectly. Now I have, and it changes everything! I think I'm on the same page with you, finally. I have uploaded my test world so you can experiment with it yourself. With it, you can easily compare how harvesting and sharing differ for different kinds of crops. (Unfortunately, as you're on iOS you don't have access to a third-party tool to let you examine the villagers' inventories.)
What I see now is that a farmer's harvesting behavior is different for each kind of crop. Earlier I was assuming that wheat was different because of the MCPE-47166 bug and carrots were different as a consequence of MCPE-32627, so that left only potatoes for this report.
Now I'm rethinking that. It looks like harvesting behavior has separate logic for each kind of crop and seed, and some of them don't work well while others don't work well in combination with each other. Even beetroots are a problem, despite how convenient their harvesting behavior is for automated farming, because it will allow a farmer to fill its inventory with beetroot and its seeds, leaving no room for other crops or bread.
The inconsistencies don't seem to make sense and interact with food sharing in a way that prevents not only automated farming but efficient supply of food in natural villages. So it might be better for us to look at combining all these harvesting issues into a single ticket. I'll be discussing this with [Mojang] Mega_Spud (Jay Wells) and will update later.
Here is a video: Carrot Bois be pushin.mp4
I was actually working on reproducing MCPE-47212, and ran into MCPE-32627. (You can also see MCPE-60331 going on here.) In the video, you can see that the villagers who are advertising carrots are trying to share them with the farmer. I did not see when they got stuck holding carrots. Since the "holding" animation does not normally play during food sharing, I would guess it was while trying to breed, as other comments attest. I doubt MCPE-32627 triggered this bug because of the picture shared by Wolff showing that this bug occurs with bread too. It could be that this bug triggers when a behavior like breeding or sharing gets interrupted by the villagers being pushed by other mobs. To my knowledge, this holding out food behavior is only supposed to occur to show trade interest, but one of the villagers holding out a carrot in my picture is a nitwit, so he should not even be able to access that behavior.
Got it again! This time with potatoes:
Mega spud boi loves to share.mp4
Observations:
- The Carrot Bois weren't carrot bois anymore after relog.
- This seems to happen to villagers when they are off-screen.
- The Carrot Bois slept holding their carrots. However, The Mega Spud Boi threw spuds to the nitwit all night long.
I've looked at both world uploads, and I think the new villager farm is experiencing MCPE-32627 intensely because the farmers don't have many non-peasant villagers to give carrots to and they cannot breed because there are no more free beds. In the old villager area, there were lots of non-farmer villagers and more beds, so the carrots could be consumed by breeding. When I explored the area, the lag was most intense when I first loaded the world. After sitting for a few minutes it was less, but falling sand was still a little bit glitchy near the farmers. Testing with a note blocks on repeater clock circuit and falling sand showed that the lag disappears when the farmers go to bed and when they are killed.
I don't see any other structures in the area that would produce excessive lag. There are no pending ticks building up, no 0-tick machines, no massive updating water flows, and I don't see hoppers transferring lots of full shulkers. Those are the other things I'm familiar with that can generate lag.



Yes, this is very annoying but not limited to carrots. Mine do it with any trade. There was a much older bug that had villagers throwing veg indiscriminately and perhaps linked with that as a complete solution might not have been found. Mind you, it is great to stand in amongst the group and pick up some free veg as I think the fault lies with the veg somehow being created during this process and nothing to do with how much they actually had to share in the first place.
This is happening in my desert village as well, with beets. The farmers(all types) won't pick up carrots for farm any other crops. Librarians and other villagers are running around with beetroot seeds.
Also affects Xbox One 1.4.2. I had a pod of 4 farmers today all throwing potatoes at each other. They do have access to potato crops nearby (and only potato crops) so in my case anyway they wouldn't necessarily need to create tubers out of thin air. It sure looks like a glitch in the villager inventory trigger mechanism, where villager A will toss food to "hungry" villager B, causing villager A now to become "hungry" and B tosses some back. In my case it was a 4-way infinite-hunger loop.
An update to my previous: yesterday I went into the village to find every single villager holding potatoes in their hands, and bunches of potatoes lying all around. Far more potatoes than I think could be farmed on the 10 or so tilled spots they have in their enclosed village. So perhaps they are spawning potatoes out of thin air...
I have removed all of the tilled land to see if they continue with the tater fest they seem to be having.
I have the same bug as well,I’m on iOS on a iPad mini 3. Villagers in my village keep throwing carrots at each other,and some keep holding a carrot.
I have found the cause of this problem. In the vanilla behavior pack, file villager_v2.json, the shareables component for peasants has an entry for carrots with the parameters "want_amount": 60; "surplus_amount": 4. These parameters are also duplicated in the farmer's work schedule. The corresponding carrots entry for non-peasants has "want_amount": 60; "surplus_amount": 24 (24 instead of 4), and so do the entries for potatoes in all three components. I'm convinced the "4" amount is a typo and should be 24.
The way sharing works is that the giver looks at its inventory for carrots to see if it has more than surplus_amount. If so, it drops as many as it has up to the other villager's want_amount. So if one villager has a full stack of carrots, it will drop 60. The other will then pick those up, but since it now has a surplus and the first villager no longer does, it gives them back.
I'm not certain the problem wouldn't occur at all if the surplus_amount were 24, or that it can't occur for potatoes. In fact, I think it will occur for any food if there's a glut of that food type is given to villagers. But with a higher surplus_amount, villagers will retain more carrots and the capacity of the combined villagers will be greater, so there's less likelihood of this occurring.
Is this still an issue in the latest version?
Mega_Spud, yes, this is still an issue in the latest version. This bug has the capability to crash a Realm, and should be fixed before the next major release.
REALMS-3089Thank you for taking the time to respond, however the question asked in January by Mega_Spud was rendered moot by the developers fixing the problem in the 1.15.0.55 Beta release in early March. Since we're skipping a 1.15 official release, it should reach official releases with the 1.16 version, for which no date has yet been announced.
Yes I see the same issue glad this is being fixed it's getting annoying now
thanks for fixing
Resolving issues that were marked as fixed in the 1.15 and 1.16 Betas, now that 1.16.0 is being released.