8

I'm currently interested in finding a librarian villager that sells Mending enchanted books, since I have been fishing forever and it's just too slow. My logic is once I find a single Mending villager, I technically have a limitless resource of mending books, so why not give it a shot?

I have a working villager farm already, but I was wondering, what are the odds of a librarian villager spawning and being able to sell Mending books at tier 1? The wiki says the following

The enchantment is chosen randomly, with equal chance of any enchantment type occurring and equal chance to get any level of it, so higher-leveled enchantments are as likely to get as low-leveled enchantments. The price in emeralds depends on enchantment level and "treasure" status. The possible values are 5 – 19 emeralds for Lvl I, 8 – 32 for Lvl II, 11 – 45 for Lvl III, 14 – 58 for Lvl IV, and 17 – 71 for Lvl V. For "treasure" enchantments the price is doubled. Note that the cost is capped to 64, meaning that for example Lvl V books truly range from 17 - 64 emeralds with costs at the upper end of the range being more common.

Does this mean that, there being 30 total enchantment types, I have a 1/30 chance of the librarian being a Mending seller, or is the enchanting pool made out of every enchantment at every level?

For example, taking into account only Sharpness and Infinity, and Sharpness having 5 levels, is the enchantment pool 6 or is it 2 and then if Sharpness is selected, a random level is selected?

1
  • > I've been fishing forever and it's just too slow < — Until/unless the MC-168981 exploit gets patched, you can AFK fish farm for treasure overnight; if you (rightly) regard macro scripts as botting/cheating, this can be done with nothing but a rock, book, or piece of tape holding down Mouse2 Commented Jan 14, 2021 at 20:16

2 Answers 2

9

First the type of enchantment is selected randomly and then after that the level of enchantment is selected randomly. This means the probability of choosing mending is 1/(number of enchantments).

In your simplified example of Sharpness and Infinity, there is 1/2 probability of choosing Sharpness. Then the level of sharpness is determined by another random roll.

4
  • 1
    So I have a 1/30 chance of getting Mending? Wow! That's amazing! Commented Mar 2, 2017 at 9:54
  • First librarian villager I encountered was selling mending for 7 ems and was about to trade and become the richest on the server, until the kid zombies attacked, RIP mending Billy 2018-2018
    – nodws
    Commented Jan 24, 2018 at 2:37
  • The problem I have with this is you see MANY enchantments dozens of times more frequently, I don't think there's a even chance for each enchantment. Of course the post is many years old, but for those searching and landing here. I can see curse of the binding dozens of times in an hour and not see Mending in 2 hours. Commented Jun 5, 2023 at 1:56
  • Update for 1.21: By my count there are now 42 enchantments in the game, which are apparently selected uniformly when a librarian's trade is picked. According to the wiki, there is a 2/3 chance that a librarian offers an enchanted book at level 1. So, a villager has a 1/42 * 2/3 = 1/63 chance of offering mending.
    – Robin
    Commented Jul 30 at 20:12
-2

I don't know but I think it is (1/30)/5 if the stuff in the brackets (parentheses) is mending then you just have to try it (if you want a specific level) (the second part will work only if the first part is mending)(I'm not counting curses and trident enchantments)

Not the answer you're looking for? Browse other questions tagged or ask your own question.