How far a villager needs to be from the village before he will try to run to it?

I have a standard 6 door village with a breeder below it, and to the side I have an auto wheat farm with a villager in it, and it's working great. However, when I tried to build the same farm a bit further, using carrots this time, the villager inside it was just stuck to the wall, in the direction of the village.

I later found out that carrots are not the same as wheat as far as villagers are concerned, and the farmer wasn't interested in harvesting the carrots. I put another villager in the farm to see if they will throw food to each other - and they did. But both of them along with the baby villager are stuck in the corner, looking towards the village.

Q: Is there any specific distance that villagers need to be from the center of the village in order to behave normally?

Thanks


Solution 1:

The farm needs to be either entirely inside or entirely outside the boundaries of your village. The radius is the greater distance of either 32 blocks or the distance to the furthest door in the village. If you have villagers within that radius and doors within their detection radius, the doors are added to the village and increase the radius. Also, Farmers should continue to plant carrots and potatoes, but will stop harvesting the crops once their inventory is full.

Check here for more info.

https://minecraft.gamepedia.com/Tutorials/Crop_farming