Minecraft Data Packs / Game Mechanic

Librarian's Balance

  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 12,853 views, 31 today
  • 1,136 downloads, 3 today
  • 45
  • 44
  • 19
Misterk7_-'s Avatar Misterk7_-
Level 64 : High Grandmaster uwu
101

The issue...


Ever found librarians in Minecraft to be a little too tedious and overpowered? It's just too easy to obtain powerful enchantments that should reflect your dedication to the game. And rerolling trades to get the one you need isn't fun or intuitive at all.

I thought this part of Minecraft really needed a rebalance, so this is what I came up with.

Introducing: Librarian's Balance


Librarian's Balance is a simple datapack that solves this issue by adding a few small things.

Featuring...

1. Customizable Trades: Place an Enchanted Book on a Librarian's Lectern, and their first or second book trade will change to the one you entered. This gives new purpose to the books you collect in the world. Some books are treasure enchantments and these will produce untradable 'sealed' variants when bought from a Librarian in this way (optional).

2. Limit Random Trades: Default Librarian book trades are capped to a level of 3. To obtain a higher level trade, you combine two identical copies on an Anvil (ex. two Lvl 3's). This would create the upgraded copy (Lvl 4) that the Librarian needs to learn from again. It could also be taken from one found in your world.

3. Rare Mending: Librarians do not trade for Mending so players will have to find it in the world. Once obtained, you can put it on a librarain's lectern to trade for more. Mending is better found as loot in an End City or Ancient City and roughly has the rarity of an armour trim.

Everything listed here can be toggled or configured with the [ /function libal:config] command (must be run as an OP). This datapack works great with the Villager Rebalance experimental feature from Mojang!

Uses


On Survival Multiplayer servers you may find enchantment progression too quick by some members of the server. Librarian's Balance provides a balanced progression system by use of experience points, emeralds, and requiring a proper level of exploration.

Feedback:

Please give feedback on the GitHub page or on my Discord server! I'm interested in hearing your ideas, opinions or suggestions from your time with this datapack. What do you think about the sealed books system? Do you think that the book pricing is appropriate?

Notes:

You might see the UI show a mending or >3 enchantment sometimes, but it's just a visual hitch and you should ignore it. Any mod that re-rolls trades besides reopening the Villager GUI will not filter their trades. This is my first datapack, so I'd appreciate any feedback or contributions.

If you're playing modded and are having issues, try running [ /function libal:load ] before running [ /scoreboard objectives add libal.main dummy ]. There's also problems in conjunction with the Amendments mod right now.

I built this datapack upon parts of gibbsly's Lectern Enchanting. I want to thank him for providing a starting point for this project, and for some of his tutorials on YouTube. Otherwise I would have had no idea on where to start making something like this :).

Configuration


To configure Librarian's Balance in-game run as an OP:
/function libal:config
For versions on 1.20.3 to 1.20.5, this is [ /function libal:options ]. Alternatively, edit [ ​settings.mcfunction ] in the folder [ data > libal > functions ] (datapack only). You can view and configure 'sealed books' from here.

--

This project is on Modrinth and is open-source.
Creditgibbsly
CompatibilityMinecraft 1.21
Tags

10 Update Logs

Update #3.2 : by Misterk7_- 06/26/2024 10:49:52 amJun 26th

IMPORTANT: IF FROM 1.20.4 OR LOWER RUN THIS COMMAND BEFORE UPDATING!/execute as @e[type=villager,tag=trader] run function libal:villager/librarian_remove
  • Compatibility with Tome Reader (mod)

Tome Reader is a mod that lets you place enchanted books on lecterns better than Librarian's Balance. It also allows you to transfer an enchantment off a book using the lectern. But they conflicted and didn't work together. Now you can use the Tome Reader mod with Librarian's Balance (which is a datapack) and get the best of both worlds.

Note that it isn't required, just optional.

Thanks Ynaught and RamGemes for reporting this and working together to get it implemented.
    LOAD MORE LOGS

    Create an account or sign in to comment.

    Misterk7_-
    05/05/2024 7:58 am
    Level 64 : High Grandmaster uwu
    history
    Misterk7_-'s Avatar
    I left out a pretty major oversight in version 3.0, so please use v2.5 for the time being.
    EDIT: Oversight fixed. Enjoy version 3.0 :)
    1
    Buku
    05/05/2024 1:32 am
    Level 1 : New Miner
    Buku's Avatar
    I need 1.20.4
    1
    Misterk7_-
    05/05/2024 6:06 am
    Level 64 : High Grandmaster uwu
    history
    Misterk7_-'s Avatar
    It’s out for 1.17 to 1.20.6, versions on modrinth
    1
    MeiaQuatru
    05/04/2024 12:40 pm
    Level 28 : Expert Explorer
    MeiaQuatru's Avatar
    Is it normal for villagers to lose their lectern trades when I move away from them?
    1
    Misterk7_-
    05/04/2024 7:09 pm
    Level 64 : High Grandmaster uwu
    Misterk7_-'s Avatar
    uh no, villagers should keep their trades until the book is taken back or the workstation is removed. mind telling me more details?
    1
    MeiaQuatru
    05/05/2024 7:26 am
    Level 28 : Expert Explorer
    MeiaQuatru's Avatar
    It's probably because I'm using PaperMC on the server. I'll test using Fabric or Vanilla to see if the bug is resolved.
    1
    MeiaQuatru
    03/26/2024 4:56 pm
    Level 28 : Expert Explorer
    MeiaQuatru's Avatar
    Is the experimental trade rebalance compatible with this datapack?
    1
    Misterk7_-
    04/01/2024 10:58 am
    Level 64 : High Grandmaster uwu
    Misterk7_-'s Avatar
    Yes
    1
    michaelo
    02/17/2024 11:43 am
    Level 33 : Artisan Taco Chef
    michaelo's Avatar
    Ay this is cool, I like the middle ground you found between completely removing mending and simply rerolling trades until you get it. Having to find it first, but then being able to trade for it afterwards is really nice.
    2
    Misterk7_-
    02/17/2024 1:33 pm
    Level 64 : High Grandmaster uwu
    Misterk7_-'s Avatar
    thanks, yeah librarains balance is supposed to be an additive pack so it shouldn't remove features from the base game.
    1

    Welcome