
Over-engineered librarian trade finder for fabric.

A highly configurable fabric mod to automatically cycle a librarian villager for the desired enchantment by replacing his lectern
1.19.31.17 up to 1.21.11You can download the mod on the releases page on GitHub
or from the Modrinth page
You can also build the project yourself.
For this just clone the repository and run ./gradlew build.
Note, that you'll need Node.js installed on your system.
The compiled mod jar can be found under build/libs/.
/librget add <desired enchantment> [desired level] [maximum price in emeralds],/librget remove <enchantment> <level>/librget clear/librget list. The output will contain a (remove) buttonDatapacks/Mods may modify villagers to trade with higher levels of
enchantments than what is set in vanilla. You may enter any value in the level argument
to add an enchantment with a greater level to the goals list.
By default, LibrGetter only parses enchantments available on the client.
If you play on a sever, the list of enchantments may be modified through a server-side
plugin to which the client has no access to.
LibrGetter add command has an edge case where you can add custom enchantments in the form
of a minecraft id. To use this feature, your enchantment has to be put in double quotes like"enchantmentsolution:sand_veil". Note, that when adding a custom enchantment to the goals list,
the level argument is required too, since the highest level is unknown.
You can read more about plugins compatibility further below
Adding custom enchantments or levels exceeding the vanilla maximum sends a warning into the chat by default.
This warning also covers non-tradable enchantments. You can enable/disable all the warnings with the config option warning.
/librget auto automatically selects the closest lectern in a 4 blocks radius and the librarian closest to the lectern,
and starts the process. If you stand close to two or more villagers and lecterns, LibrGetter might select the wrong targets.
/librget (client-side command)/librget once again/librget startStopping a process is as simple as writing /librget stop.
To continue the process after stopping, the recommended way is to use /librget continue,
which works the same way as /librget start, but will not reset the counter.
Restarting with /librget auto will not keep the counter as well.
/librget config autoTool <true/false> - enable/disable automatic tool selection (default: true)/librget config offhand <true/false> - enable/disable putting the lectern in the offhand for higher efficiency (default: false)offhand config and it will remain there/librget config manual <true/false> - enable/disable manual mode (default: false)/librget stop/librget config waitLose <true/false> - enable/disable waiting for villager to lose profession (default: false)/librget config safeChecker <true/false> - enable/disable the safe checker (default: true)/librget config timeout <int [0; 20]> - Time in seconds to wait for a villager to update its profession before replacing the lectern0, this option is disabled (default)/librget config rotationMode <NONE/INSTANT/SMOOTH> - How to change head rotation between breaking the lectern and talking to the villager (default: INSTANT)NONE - don't change head rotation; may trigger AntiCheatsINSTANT - rotate the head instantly; should bypass most simple AntiCheatsSMOOTH - imitate natural player head rotation; slows down the process drastically but should bypass even some advanced AntiCheats/librget config notify <true/false> - enable/disable sound notification when finding an enchantment (default: false)/librget config lock <true/false> - enable/disable locking the trades after match (default: false)/librget config removeGoal <true/false> - enable/disable removing the goal from goals list when being found (default: false)(remove)-button will appear in the message/librget config logMode <NONE/CHAT/ACTIONBAR> - where to log found enchantments (default: CHAT)NONE - don't log anywhereCHAT - log in the client chatACTIONBAR - log into the action bar/librget config checkUpdate <true/false> - enable/disable checking if a new update has been released (default: true)/librget config warning <true/false> - enable/disable warning when custom enchantments format is used (default: true)/librget config fallback <true/false> - Fallback option to search for unsupported enchantments (default: false)/librget config matchMode <VANILLA/PERFECT/NUMBER> - When to stop cycling (default: VANILLA)VANILLA - the first or the second trade matches the goals listPERFECT - all offered trades match the goals listATLEAST - at least N trades must match the goals list, N is given by matchAtLeast/librget config matchAtLeast <int [1; inf)> - Number of unique trades which must match the goals list to consider the attempt a successmatchAtLeast is greater than the amount of items in the goals list, LibrGetter will use that amount instead.While VANILLA is pretty intuitive, the other two Match Modes may be a bit confusing.
You'd use PERFECT, whenever you want to get a perfect villager without any wasted trade offers.
You'd use ATLEAST, whenever you want to effectively find some enchantments from your goals list, while tolerating wasted trade offers.
Some example scenarios:
matchMode ATLEAST and matchAtLeast 1matchMode ATLEAST and matchAtLeast N where N is the amount of items in your goals listThis list of configs enables/disables compatibility with different client-side mods, possibly modifying the process of finding an enchantment.
All compatibility configs are disabled by default.
Compatibility configs are grayed out when the corresponding mod is not installed.
You can read more about what each mod changes
/librget config tradeCycling <true/false> - Trade Cycling integrationYou can use /librget config <config> to print out the currently set value.
In addition to that you can modify the config file manually. The file is located at <minecraft folder>/config/librgetter.json
LibrGetter provides a keybind to open a book GUI with clickable configs
and their short description. By default, the keybind is set to the letter K.
The menu provides an overview of all togglable configs and grays out configs which have no effect with the current setup.
LibrGetter tries to be compatible with all other mods, by modifying the client as little as possible.
Mods that previously were not compatible and were made explicitly compatible:
Mods that add/change functionality of LibrGetter:
With Trade Cycling (Modrinth) installed on both the server and the client,
instead of replacing the lectern, LibrGetter will push the cycling button, until an enchantment is found.
Since Trade Cycling requires you to have the Merchant screen open, the process can't be stopped using commands,
instead you can close the trading screen to automatically stop.
With Visible Traders (Modrinth) or any similar mod,
it is now possible to customize the search even further by adjusting the matchMode config.
In a previous update, a system with fallback for dynamic plugin support was developed allowing me to explicitly add support for new plugins.
The finding of enchantments goes through following steps:
Explicitly added plugins:
Plugins, that are known to be compatible without further adjustments:
You can request support for more plugins in the issues.
If possible, please provide the whole output of the /data get entity <villager> command,
where villager is a librarian selling at least one custom enchantment provided by the plugin.
LibrGetter supports localization and currently implements the following languages:
You may request further languages or suggest improvements in the issues or
the Discord Community.
I am a computer science student in Germany and have a part-time job at a tech company.
Apart from that, I enjoy my free time by spending it with friends, chatting online or gaming.
If you want to keep this project alive, found it helpful or just want to support and motivate me to go on,
you could consider making a small ☕ donation.