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 (for example Sharpness V). If you renamed the villager with /vname, your colorful name sits on top and the profession line moves underneath as a subtitle.
- Librarians only. Other professions show no card at all, since they sell no books.
- 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.
Catalogued on first trade
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 trade with a villager, the mod files their books under the nearest nearby villager and remembers them from then on. Catalogues persist in config/betterlibrarians_data.json, so they survive restarts. Up to 256 villagers are kept; the oldest entries are dropped first.
Villagers you have never traded with show a one-line hint instead (Trade once to catalogue 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.
- 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.
- Non-librarians get no card, and renames are the only thing the mod ever changes on them.
- Nothing runs on servers. Dedicated servers never load any of this code, and no packets are sent. 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. Cataloguing happens only while a trading screen is open. There is nothing to feel.