The Village Names mod assigns randomized names to villages and villagers, and also to structures like mineshafts, strongholds, fortresses, and so on.
Update: Version 1.1a and support for Forge 1.12 (use 1.1b)
Version 1.1 is finally finished.
Here is the changelog:
v1.1b (1.12 only)
▪ Critical update: Forge overhauled its registry system starting at 126.96.36.1998 forward, and this caused version 1.1a to crash.
▪ Added Lunarin Style Iron Brick.
▪ Bugfix (1.8.9 and up): Functionality such as random villager names and Codex creation now works if your Language setting is not English!
▪ Bugfix (1.11.2 and 1.12): Using a name tag on a villager does not permanently rename them (unless "Name villagers"=false, as intended)
▪ Bugfix (1.7.10, 1.11.2, 1.12): Item names now display properly.
▪ When writing a Village Book, villagers can add a second page that hints at the location of an interesting structure to explore.
▪ Added a new item: the Codex. Right-click this while also owning a blank book to discover and record the name of a structure you're in (Village, Temple, Mansion, End City, etc).
▪ Names for all structures draw from different syllable pools and are configurable.
▪ To obtain a Codex, right-click a named Librarian/Cartographer while holding an emerald or iron/gold ingots.
▪ There is now a config option to add/remove a villager's career to their name when you talk to them (off by default).
▪ There is now a config option to handle and include villagers from other mods so that they can generate structure hints and display careers with their name tags.
▪ Bugfix: non-cobblestone wells should now generate signs and rim slabs.
▪ Bugfix (1.7.10): stopped console from spewing out "PopulateChunkEvent triggered."
▪ Generated village books are now dropped directly into the player's inventory (configurable).
▪ Bugfix (1.9.4 and 1.10.2): sneak-right-clicking a book onto a villager does not consume two and produce two Village Books.
▪ Change: villagers don't create a Village Book if you have negative reputation in that village.
▪ Bugfix: generated villages now correctly save the color of their clay sign base. This color info may be used in the future.
▪ Village wells generate with signs on them and slabs around the rim (configurable).
▪ Right-clicking a villager reveals its name (configurable).
▪ Right-clicking a book onto a villager causes it to record the village's name, location, population, and radius into a Village Book.
▪ Syllables in village and villager name pools are configurable.
And here is a mod showcase video I did to cover all the general stuff the mod can do:
Version 1.1a features:
1.1a only adds one new "feature," the Lunarin Iron Block:
...however, this new feature was just an excuse to motivate me to upload a bugfix: If you were not using English language settings, villager names and Codexes would not generate for versions 1.8.9 and up! This issue should be fixed as of 1.1a.
Version 1.1 features:
You can add the villager's career to their displayed name:
Villagers only respond to changes in this config setting when you interact with them.
Nitwits do not display any career by default, but you can add your own string in the configs.
When your reputation is high enough, a villager may write a second page when writing you a Village Book. This second page gives a hint about the location of a structure such as a Mineshaft or a Temple!
The generation of this second page is not random, and it's also not guaranteed. It depends on the villager you talk to, your reputation, and the proximity of certain structures. For example, a Butcher will only tell you about temples or other Villages. A Librarian will tell you about Strongholds or Mansions.
For those of you interested in the exact machinery involved in writing a second page, check here:
A villager will generate a "hint page" if its search radius contains a structure of the correct type.
The structure types each villager profession* can find are:
Farmer (not Fisherman): Village
Fisherman: Ocean Monument
Librarian: Stronghold or Mansion
Butcher: Temple or Village
Nitwit: Any of the above
*With the exception of Farmer/Fisherman, a villager's Career subtype is irrelevant.
The search radius around the villager, in blocks, is:
[Player's reputation] × sqrt[(Number of trades the villager offers) + 1] × 64
1.8.9 and up:
[Player's reputation] × sqrt[(Number of trades the villager offers)/2 + 1] × 64
Since the Nitwit does not offer trades, his search radius is different:
[Player's reputation] × 160
The search radius for Strongholds specifically is the above times sqrt(2) ≈ 0.7 for all versions (effectively, half search area compared to other structures).
The villager will always report the nearest valid structure.
A villager will only generate a "hint page" if he's named.
A villager that's a child, or that's not in a village, will not write a Village Book and so won't report a structure, even if there is a valid one. A villager also will not write you a book if you have negative reputation.
Fun development note and disclaimer regarding player reputation in villages:
While making this mod I discovered a bug in vanilla Minecraft that's been in place for as long as 1.9, and probably still exists: whenever a server gets restarted, all player reputations for every village are reset to 0. This is to do with the changeover from username to UUID, and went unnoticed for so long because player rep was hardly used in the vanilla game. LexManos tried to fix it on Forge's end but I don't think it was properly repaired, so I have a band-aid custom reputation handler in place. As a result, player reputation isn't always 100% accurate between server restarts for the mod's 1.9.4 and later versions.
Right-clicking a stack of emeralds, iron ingots, or gold ingots onto a Librarian or Cartographer (white robe) villager allows them to create the new Codex item.
Here is the Codex in-hand:
Generally, a Codex will cost about 4 emeralds, and you can substitute up to one emerald with about 3 gold or 6 iron. The exact details are below for anyone who's interested:
If you have 0 reputation with the village:
Right-clicking with an emerald stack consumes 5 emeralds.
Right-clicking with an iron ingot stack consumes 4 emeralds and 8 iron.
Right-clicking with a gold ingot stack consumes 4 emeralds and 4 gold.
If you have 10 reputation (max) with the village:
Right-clicking with an emerald stack consumes 3 emeralds.
Right-clicking with an iron ingot stack consumes 2 emeralds and 4 iron.
Right-clicking with a gold ingot stack consumes 2 emeralds and 2 gold.
The villager will refuse you if you have negative reputation.
Each time a villager makes you a Codex, there's a 50% chance your reputation will increase by 1.
If you right-click the Codex and you have an ordinary book in your inventory, both will be consumed and you will receive a written book containing the name and coordinates of the structure you're in!
Here I've visited Vinria, as per the hint given to me in the earlier Village Book. I've used the Codex to generate a Temple Book (in hand):
A villager does not need to have discovered a structure before you! Here I've used the Codex to discover the name of this Stronghold:
The Codex can even be used in the Nether and the End to record the long-lost names of Fortresses and End Cities!
Be careful: the Codex can be used in villages! Don't waste a freshly-obtained one by accident!
Names for Villages, Villagers, Mineshafts, Temples, Strongholds, Monuments, Mansions, Fortresses, and End Cities all have their own unique syllable pools in order to lend a different feeling to these features (e.g. Fortresses tend to sound Greek-like). These are completely configurable.
Lastly, version 1.1 allows the above features to be accessible to mod villagers by way of a config file. The default config values and explanation are below:
The Brewer and Apiarist villagers from Growthcraft use Profession IDs 10 and 14 by default. When they write Village Books, they will behave like a Farmer and a Butcher, respectivey: that is, the Brewer will only report other villages, and the Apiarist will report either villages or temples.
Warning! These default values have only been tested for 1.7.10. But as these arrays can be modified, you can fix incorrect values or add functionality for other mods' custom villagers.
Version 1.0 features:
This mod patches up a shortcoming that I'm surprised that nobody else has addressed.
Whenever a village is generated, it also generates a sign nearby the well:
An option in the configs changes the well's rim to slabs so that villagers and players won't get stuck inside.
Anyway, that sign shows a randomly generated name for the village:
Whenever you interact with a villager (i.e., open the trading GUI), the villager will reveal its name to you:
The village's sign can be broken, or may accidentally not generate (they do not generate on SuperFlat for 1.7.10 or 1.8.9!); or you may install this mod after a village has generated, but this mod has no retrogen. In any of these cases you might think that affected villages won't have names. But don't worry:
If you right-click a book onto a villager, it will record the village's name and location into it!
This of course will also work even if the village has a sign by the well. Anyway, according to this Village Book, there is a fourth villager that we haven't discovered.
Ah, there s/he is.
The village and villager names are generated from a pool of many hundreds of real-world and fantasy town/character names that are split apart and reassembled, resulting in so many possible combinations that honestly I can't be bothered to calculate the number. These name pieces are accessible in the config files.
Lastly, since this is my first (and only) modding project, I had to learn Java/Eclipse/Forge—absolutely everything from scratch. As a result of the many tutorials I browsed, I did make one custom decorative block:
This is a shapeless recipe. Just six gold ingots.
Here's an imgur gallery of all the pics above and a number of others showcasing more random names I generated during the testing processes.
This mod was designed with other exploration/adventure mods in mind. Please, use this in modpacks. Just don't be untoward about it.