Minecraft Data Packs / Game Mechanic

Librarian's Balance

  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 10,917 views, 22 today
  • 938 downloads, 2 today
  • 41
  • 38
  • 19
Misterk7_-'s Avatar Misterk7_-
Level 64 : High Grandmaster uwu
99

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.20
Tags

8 Update Logs

Update #3.0 : by Misterk7_- 05/04/2024 7:18:06 pmMay 4th

IMPORTANT: RUN THIS COMMAND BEFORE UPDATING TO 1.20.5/6 (if you haven’t already)!/execute as @e[type=villager,tag=trader] run function libal:villager/librarian_remove
An update featuring Librarian travelling, Unlimited book enchantments(!), and a scaleable pricing system. Custom enchantments in modded should work again. This is the last major update to Librarian's Balance for now. I've been getting pretty carried away lol.

Additions

- Librarian's travel back to their Lectern when a book is placed onto it
  • Adds immersion and makes it easier to trade with them in an open village.
- Unlimited book enchantments
  • Now Librarian's can learn the full range of enchantments on your book at once!
  • Previously only one enchantment was allowed on a librarian's book. But there's a catch.
  • A Librarian's enchanted book cost is calculated based on how powerful your book is.
- How an Enchanted Books' Emerald price is calculated
  • It takes two parameters from your book; the best enchantment & the number of enchantments
  • Price of enchantment = price(best enchantment) * number of enchantments
  • The 'best enchantment' is usually the highest level correlating price (Lvl1 = 7, Lvl2 = 14, Lvl3 = 21, Lvl4 = 36, Lvl5 = 48),
  • or, a special enchantment that overrides this (ex. mending = 52, silk_touch = 48, flame = 36, soul_speed = 24, & more. )
  • there's a python script for this on github
    - 'wind_burst' has been added to the 'sealed books' list
    • The sealed books list is now: [ wind burst, soul speed, swift sneak, frost walker, curse of binding & vanishing ]
    • Fun fact: you can now make any book sealed by combing a sealed enchantment to any other book!
    Changes

    - 'Sealed books' is now enabled by default (you will have to re-enable it manually)
    - /reload no longer resets all your settings
    - /function libal:options has been renamed to /function libal:config
    - Improved compatibility with trade rebalance datapack.
    - Particles, sound and visual reinforcement
    - Swamp villagers are exempt from the mending removal
    • Another option to gain mending similar to the rebalance experimental feature.
    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 25 : 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 25 : 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 25 : 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 32 : Artisan 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
    Planet Minecraft

    Website

    © 2010 - 2024
    www.planetminecraft.com

    Welcome