mojira.dev
MC-264696

New librarians are offering the exact same enchanted book multiple times

The bug

Librarians can have 2 different trades of the same level of the same enchanted book, but for different prices. This was previously reported as MC-71354, and it was resolved as "Works As Intended" with the explanation "Random does what Random likes." However, that resolution occurred in 2015 and the recent changes to villager trading in 23w31a mean that this will occur much more often than it used to.

To reproduce

Trade with several librarian villagers until all of their trades are unlocked. Observe their trades. Pretty quickly, you will encounter a villager with two trades for the exact same book for different prices.

Expected behavior

There are 2 possibilities, depending on opinion.

Possibility 1
The books offered by a single librarian should either be different enchantments, or different levels of the same enchantment.
Possibility 2
If a librarian villager has two trades for the same level of the same enchantment, both trades should be the same price.

Observed behavior

Identical books can be offered by the same villager for different prices.

Original description

A similar report was made before and it was marked "work as intended" because the villagers' book trades were completely random. Now the trades are not so random and the problem tends to repeat itself several times.

Linked issues

Attachments

Comments 5

Confirmed, rather than selecting 2 enchantments from the comon group, it selects one for each trade, allowing it to be the same enchantment.

I tested this by trading with 5 plains librarians until they were all master level. The first one I traded with had two Bane of Arthropods IV trades, for 52 emeralds and 41 emeralds (before discounts). The next 3 librarians did not have any duplicate trades. The last librarian I traded with offered Bane of Arthropods V for 19 emeralds and Bane of Arthropods III for 20 emeralds.

The explanation "Random does what Random likes." is not very convincing.

Consider the enchanting table mechanics:  You will not end up with an enchanted piece of armor that has both e.g. Protection and Fire Protection, you will not end up with a pick axe that has both Fortune and Silk Touch, you will not end up with a sword that has both Sharpness and Smite, and so on.  I am NOT suggesting that this would make sense, let alone that this should be possible.  My point is that the developers were clearly able to implement a solution that prevents incompatible enchantments, that restricts Random's hand ever so slightly.

So it isn't inconceivable that librarians can be "trained" to not offer the same enchantment multiple times, be it the same or different level or price.  In the least, make it so that the more advanced trades can only be cheaper or higher-level enchantments than before.  Lower levels or higher prices don't make any sense.

Had same issue but with 3 books 

[media]

[media]

[media]

A lot of thought and effort is being put into the Villager Trade Rebalance Experiment at the moment.  Closing this issue (again, see MC-71354) with "works as intended" is - with all due respect - a little disappointing.

LucasVSantos

(Unassigned)

Confirmed

Trading

23w31a, 23w32a, 1.20.2 Pre-Release 4, 1.20.2 Release Candidate 1

Retrieved