Better Librarians features
The look-at title card
When your crosshair rests on a librarian and no screen is open, a small centered card appears near the top of the screen. The first line names the villager's profession and level (for example Librarian · Apprentice), and below it each enchanted book they sell is listed with its emerald price from your last trade (for example Sharpness V, 38 emeralds). If you renamed the villager with /vname, your colorful name sits on top and the profession line moves underneath as a subtitle.
- Books on librarians. Other professions sell no books, so their card only shows the restock timer.
- Gold means maxed. Books at their vanilla max level render in gold; lower levels render in white. Toggle with
highlightMaxLevel. - Levels on demand.
showLevelswitches between Sharpness V and plain Sharpness. - Long lists are capped. At most
maxBooksbooks (default 6, up to 12) are shown; the rest collapse into an …and N more line.
The restock timer
The card and the trading screen show which trades are sold out and when the villager restocks next: Restocks in 4:10, Restocks any moment now or Restocked twice today, next in 12:30. The times are real minutes and seconds. It works for every working villager, not only librarians.
- Exact with the mod on the server. Always in singleplayer. A server with Better Librarians sends players who have it the stock of the villagers near them once a second, including how many restocks they have used today.
- An estimate elsewhere. On servers without the mod, the timer works from the time of day and the stock you saw the last time you opened the trading screen, and says that it is an estimate.
- The rules it follows. Villagers restock only while they work (8:00 to 15:00 in game time) and stand at their workstation. They check about every 15 to 30 seconds, restock at most twice a day, and the second time at least 2 minutes after the first.
When a villager can't restock
A villager with no workstation never restocks, and neither does one standing more than about one and a half blocks from it while it works. That is the usual reason a trading hall "stops working": the cell was built one block too far from the lectern. The card says so.
Turn the timer off with restockTimer, or keep it on librarians only with restockAllJobs. See configuration.
The librarian list
Press K or run /librarians to see everyone you have traded with in this world or on this server, nearest first, with distance and direction. Each world and server keeps its own list. Rebind the key under Controls, in the Gameplay group.
- Search by book. Type mending to see who sells it, cheapest first.
- Stock. The selected librarian shows their stock and restock time, live when they are near you on a server with the mod, otherwise as you last saw it.
- Find. Makes the selected librarian glow for 30 seconds, through walls. It only works while they are loaded nearby; farther away, the list shows where you last saw them.
- Forget. Removes a librarian's books from your list. Trade with them again to bring them back.
- Other dimensions. Librarians in another dimension show as In the Nether or similar, at the end of the list.
Catalogued when you open their trades
The client only learns a villager's trades when their trading screen is open: vanilla syncs offers to the open menu, never to the villager entity itself. So the first time you open a villager's trades, the mod files their books under the villager you are looking at and remembers them from then on, along with each book's price and where the villager stands. Prices update whenever they change, for example with demand or your reputation. Catalogues persist in config/betterlibrarians_data.json, so they survive restarts. Up to 256 villagers are kept; the oldest entries are dropped first.
Librarians whose trades you have never opened show a one-line hint instead (Open its trades once to see its books), unless you turn showUncataloguedHint off, in which case no card appears for them at all.
Renames with /vname
Look at any villager (any profession, not just librarians) and type /vname &aBob the &lBrave to float a name above their head. /vname clear removes it. Renames work through the vanilla custom-name rendering, client-side only: other players see your names only if they have the mod installed too. Your original nameplate (if the villager had one) is restored when you clear the rename or disable the mod.
&#ef5350&lShelly &fthe Librarian, &aFarmer &#ffa657Joe and &dPriest &f&oMarcus.- Legacy codes:
&0–&9and&a–&fcolors,&lbold,&oitalic,&nunderline,&mstrikethrough,&kobfuscated,&rreset,&&for a literal&. - True RGB: any of
RRGGBB,{#RRGGBB}, or&x&R&R&G&G&B&B— for example/vname ff55aaBobby. - Limits: names are clamped to 48 characters, and names with no visible text are rejected.
What it leaves alone
- Trades themselves are untouched. Prices, stock, and rerolls behave exactly like vanilla; the mod only reads the offer list.
- Other villagers only get the restock timer, and renames are the only thing the mod ever changes on them.
- The server part only reads. On a server with the mod, it reads the stock and restock counters of villagers near players who have the mod and sends them once a second. Nothing about villagers or trades changes. Each player's catalogue and renames live in their own client config folder.
Performance
Per client tick the mod does one pass over the villagers currently being rendered to keep renames in sync, and draws the card only while you are actually looking at a librarian with no screen open. The list costs nothing until you open it. Cataloguing happens only while a trading screen is open. There is nothing to feel.