Are there rules governing the profession of spawning villagers?
In my world, a village spawned on top of a lake. This was really interesting, but the villagers would exit their buildings and immediately fall into the water. I connected the houses with floating sidewalks so they could traverse the buildings, but apparently they liked jumping off the walkways. Eventually they drowned themselves to extinction.
So I revamped the village with fences and walls to prevent suicides and invading hostiles, and began a long re-population effort through curing zombie villagers. After augmenting the village with additional buildings, they finally bred, and I was able to get to a large enough population that an iron golem appeared.
Strangely, however, none of these villagers are farmers! I had a few farmers in the early days, but those guys must have died somehow. Now I probably have a population of thirty or so, but not a single one working the land. The two naturally-generated farm plots are still present. I even built animal pens on the outskirts.
I'd like farmers, because they give me the easiest means to earn emeralds. All these librarians, priests, mages, and blacksmiths don't have the best trade offers.
Is there anything that controls whether farmers will be generated? If so, how can I get this to occur?