Librarian's Balance
This datapack/mod completely redesigns the system of obtaining enchantments through villagers, turning librarians into true book merchants without unnecessary complications.
Basic Working Principle
To upgrade enchantment levels in an anvil, two identical enchanted books are now required. Librarians can create book duplicates in exchange for emeralds, which significantly reduces reliance on randomness and creates a progressive system for developing your enchantment collection. With sufficient emeralds (for creating copies) and experience (for combining), you can turn a level 1 book into a level 5 book by repeating this process.
Key Features
Customizable Trades
Place an enchanted book on a librarian's lectern, and their first or second book trade will change to your selected one. This gives new purpose to books you find in the world. Some rare enchantments create non-tradable (sealed) versions when purchased from a librarian this way.
Limited Random Trades
Librarians' random trades with enchanted books are now only available up to level 3. To obtain level 4 and 5 books, you must use the new customizable trade system. You only need one book of the desired enchantment, which can be gradually upgraded by investing emeralds and experience.
Rare Mending
Librarians do not trade Mending books - players must first find them in the world. After obtaining one, you can place such a book on a librarian's lectern to create additional copies. Mending is found in End Cities and Ancient Cities with the same frequency as armor trims.
Settings and Compatibility
All listed features can be enabled/disabled or configured using the /function libal:config command (requires operator privileges). The datapack works excellently with Mojang's experimental villager trade rebalancing feature!
Application on Servers
On survival multiplayer servers, some players may consider enchantment progression too fast. Librarian's Balance creates a balanced progression system requiring experience costs, emeralds, and a certain level of world exploration.
Technical Notes
Sometimes the interface may display Mending enchantments or levels above 3 - this is just a visual error that can be ignored. Compatible with the Amendments mod! The Tome Reader mod is fully supported, adding improved placement and enchantment transfer mechanics (only for versions 1.21 – 1.21.1).
If problems occur, try executing the /function libal:load command to reload the datapack. Make sure you didn't extract the archive into the folder.
Configuration
Execute the command:
/function libal:config
Alternatively, edit the settings.mcfunction file in the data > libal > functions folder (datapack only).