I built a large 27x27 automatic carrot farm divided in half with one farmer working each half. The farm was working just fine until I added a dirt ceiling right above the farmer's heads, leaving a 2-high gap for the farm. My intention is to create additional farms above the carrot farm. Once I enclosed the farmers with dirt they both started acting erratically by planting, then immediately harvesting the planted crops staying within probably a 3x3 patch of ground.
I tried a few different things to see how reproducible it was. I determined that the farmer tended to get stuck in two locations diagonal from the center drop off point. Creating a skylight at these locations (open air, transparent block, even farmland) caused the farmer to go back to normal operation. A solid block causes the ai to start behaving erratically again. Ceiling height did not appear to affect the issue, as I cleared out a 3-high ceiling and it still had the same issues.
Attachments
Comments 3
In addition to what @unknown said, the farmer would appear to be getting stuck in one place under the low-light conditions but it's actually just alternating between replanting two adjacent crops, each of which pops off when the other gets planted. This keeps them permanently out of sync, so the farmer always finds something that it needs to do right there without having to move somewhere else.
If you feel that this explanation doesn't fit what you're observing in your farm, please comment to tell us what seems to be different.
This ticket has not received a response or been updated recently, so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Based on your description and the screenshot, I think this is working as intended. The issue is not that the farmer is harvesting recently planted crops, it is rather that the crops pop out of the ground because there isn't enough light (They require light level of 8 if artificial, 5 if natural) to stay planted. The mechanics here can be a bit confusing however: The crop without enough light will only un-plant when it receives an update. In the farmer case, this is typically due to the crop getting updated because the farm land next to it was planted, which makes it look like the villager is harvesting them. This is actually a mechanic used in some fully automatic carrot and potato farms.
You can sacrifice one farmland to have light reach the other crops. Or if you have 3-high ceilings, you can place lights on top of these areas to have them grow the crops.