mojira.dev
MC-45489

Villager Spawn is Unbalanced/Broken

Moderator Note

This ticket relates to unbalanced spawning of villagers. This has been reported for the following types and suspected causes:

Frequent: (Too Much)
Clerics - Superflat/? - ?
Librarians - ? - ?
Nitwits -? -?

Infrequent: (Not Enough)

None: (Never)
Farmer - Superflat - No grass.

For some reason, about half the villagers are clerics; and I can't seem to find a normal villager. There are normal levels of other villagers though.

Additionally, all the clerics seem to have the same trade pattern, but with varying cost. It goes:
Sell rotten Flesh
Sell Gold
Buy Redstone
Buy Lapiz
Buy Eye of Ender
Buy Glowstone

Picture shows just a small section of the village


Code analysis by @unknown can be found in this comment.

Linked issues

MC-46175 Villages in superflat spawn with excessive librarians Resolved MC-46306 Villager Farmers Replaced with Clerics Resolved MC-47848 Village Professions are bugged. Resolved MC-48091 Villager Spawning Issues Resolved MC-48694 Superflat village spawned with about 15 librarians and clerics, no others. Resolved

Attachments

Comments 58

Same trades are expected with the new re-balancing of villager trades.

This is most definately a bug, and a serious one at that. If a farmer villager can't spawn, then they won't be able to repopulate, due to new breeding mechanics. Also, if they are all clerics for example, the village won't have variety, and just plain makes no sense. It seems random villagers spawn ONLY in place of FARMER villager types, since they spawn in the small huts by the farms, where the farmers should live. They also spawn in the big farmhouses, also where farmers should be. otherwise, butchers spawn in butcher shops, blacksmiths in smithies, claerics and librarians in libraries and churches. It's just farmers.

Also, this issue still occurs in 14w11b, update the version to this one. I attatched a screenshot, forgot to press F3, just take my word it is in 14w11b.

I agree with Paul that this is an issue that needs to be looked at. At a random sampling of villager spawn eggs (about 200), I got the following results:
Cleric - 20%
Librarian - 20%
Tool Smith - 6%
All other Trades - 34%

Sampling across 3 random villages on one map and got the following distribution:
Type: Flatworld ("overworld" preset)
Seed: 1
(all coords are approximate and are only meant to get you to each village)
Village 1: x=141 / z= 67
Population Breakdown: Butcher-9, Leatherworker-3, Librarian-3, Weapon Smith-3, Cleric-3, Tool Smith-2, Armorer-1

Village 2: x=-208 / z=91
Population Breakdown: Butcher-3, Leatherworker-3, Tool Smith-3, Weapon Smith-3, Cleric-3, Librarian-2, Armorer-1

Village 3: x=-148 / z=-232
Population Breakdown: Leatherworker-5, Librarian-3, Weapon Smith-3, Cleric-3, Fisherman-3, Butcher-2, Armorer-2, Tool Smith-1, Shepherd-1, Fletcher-1

It appears that randomization logic is different between the world generator and egg spawning, but the former is more important for game balance and must be addressed insofar as ensuring that there is at least one farmer (not fisherman/sheperd) for every garden plot in a village.

I believe there needs to be more farmers (not shepherds or fisherman) and less of the other overbalanced trades, such as butchers, clerics, and librarians. Perhaps a percentage-of-population limit should be created to limit overpopulation of one trade?

All the brown robed villagers are considered "farmer" villager types, so they will all farm. And your results are pretty accurate, there should be an amount of each villager type proportional to the house types. Churches should spawn clerics, libraries librarians and so on, like in the current version. It seems they are spawning in their respectful buildings, but in the farmhouses I notice they are randomized. There could be a farmer in one once in awhile, but it seems like mostly it's another type all the time. So I think maybe, with the farmer villager AI changes, it may have somehow made their spawning randomized. Next village you find, quickly look in the small houses by the farms, and you will see randomized villagers, then go into a butcher, smithy, library or church and see the respectful type spawning there, if they didn't leave their houses yet.

I see this problem exists in regular worlds as well:

Seed -1807573885
Village -250, 165 Desert
Librarian 4
Leatherworker 1
Shepherd 1
Armorer 1
Weapon Smith 1
Fisherman 1
Farmer 1

Village -907, 564 Desert
Cleric 1
Librarian 7

Village 2049, -363 Plains
Librarian 2
Butcher 1
Fletcher 1

Please update and confirm. Thank you.

48 more comments

Affected Version: 1.13 pre.release

After hours of breeding I got every type of Villager, but the spawning rate for
Librarian and Cartographer is very low - approx. 24:1 (where 24 represents all other types).

I made this report 4 years ago. I'm still receiving emails on it to this day. I think at this point, "it's not a bug, it's a feature" applies. Mojang is obviously okay with the spawn rates, and I don't think they are planning on changing villager spawns. If this was unintended behavior, I think they would have updated us on this issue by now. I think it's time to let this one go.

The developers might fix this in the Village and Pillage update. They said that villagers would be smarter and actually have roles in the village, and it would be stupid if 20 farmers in a village decided "farm time" and start crowding the farms like crazy. Both villages and villagers are now getting a huge overhaul!

This no longer applies in 19w11a. Villagers will never spawn with a set profession, and instead select their profession based on the workplace blocks in the village.

You can’t really trade a green villager since it can’t be tradable 

Matthew Pringle

Agnes Larsson

Community Consensus

cleric, priest, spawn, superflat-world, unbalanced, villager

Minecraft 14w04a, Minecraft 14w25b, Minecraft 14w32a, Minecraft 1.8-pre3, Minecraft 1.8, ..., Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w22c, Minecraft 1.13-pre1

Minecraft 19w11a

Retrieved