<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:08:36 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[MC-5653] Enchanted Book offers will only ever get worse with villager trades</title>
                <link>https://bugs.mojang.com/browse/MC-5653</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;Edit: Replaced my crummy explanation with a better one, courtesy of Torabi.&lt;/p&gt;

&lt;p&gt;This is a complicated issue, caused by a collision of multiple trading mechanics. The code doesn&apos;t really distinguish between the enchantments placed on the books &#8211; other than to set the price based on the level of the enchantment. So an offer of a book with a particular enchantment can be replaced with a book with any other enchantment, because all it checks when generating an offer and determining whether to add a new one or replace an existing one is the item ID.&lt;/p&gt;

&lt;p&gt;    The first component is &lt;a href=&quot;https://bugs.mojang.com/browse/MC-349&quot; title=&quot;Villagers ignore data tags in trading&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-349&quot;&gt;&lt;del&gt;MC-349&lt;/del&gt;&lt;/a&gt;: all potential offers for Enchanted Books are considered the same item, regardless of the enchantment or its level.&lt;br/&gt;
    When generating a new offer, if the item matches an existing offer, it only replaces it if the price is better. If it&apos;s not better, nothing changes.&lt;br/&gt;
    Enchanted books are priced differently than other items, based on enchantment level: (2 + level * 3 + random(0, level * 10 + 5)).&lt;/p&gt;

&lt;p&gt;The result of these three components is that low-level books can easily replace higher-level books, but high-level books can never be priced low enough to ever replace some low-level offers. For example, the minimum cost for a level 5 enchantment is 17 emeralds. Once a librarian generates an offer for an enchanted book priced lower than that, they will never again offer a level 5 enchanted book. (Ranges for all levels, from the wiki: level 1: 5 &#8211; 19, level 2: 8 &#8211; 32, level 3: 11 &#8211; 45, level 4: 14 &#8211; 58, level 5: 17 &#8211; 71). Because of the random nature of generating offers, it&apos;s guaranteed that the more you trade with a librarian, the worse their offers will get. This is the exact opposite of how trading works for every other type of trade, including the librarian&apos;s offers for other types of items, in which it&apos;s guaranteed that offers will never get worse, and, if you trade with a villager enough, you will eventually unlock all their potential trades, at the lowest possible prices.&lt;/p&gt;

&lt;p&gt;The enchanting offers provided by priests work entirely differently than enchanted books. The cost only ranges from 2-4, and is not related to the enchantment or its level. Offers can be replaced with a different enchantment, and that enchantment may be better or worse, but the full range (all enchantments that would cost 5-19 exp levels if you used a enchanting table) is always available for the offer generator to pick from, and nothing about the existing enchantment offer will ever exclude part of that range.&lt;/p&gt;

&lt;p&gt;It is almost certain that the behavior of enchanted book offers is an oversight, not an intentional deviation.&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="18290">MC-5653</key>
            <summary>Enchanted Book offers will only ever get worse with villager trades</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="fmk">Kyle Egli</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Jan 2013 18:05:19 +0100</created>
                <updated>Mon, 3 Mar 2014 16:36:45 +0100</updated>
                            <resolved>Mon, 3 Mar 2014 16:36:45 +0100</resolved>
                                    <version>Minecraft 1.4.6</version>
                    <version>Minecraft 1.4.7</version>
                    <version>Minecraft 1.5</version>
                    <version>Minecraft 1.6.2</version>
                    <version>Minecraft 13w36b</version>
                    <version>Minecraft 1.7.2</version>
                    <version>Minecraft 13w48b</version>
                    <version>Minecraft 1.7.4</version>
                                    <fixVersion>Minecraft 14w08a</fixVersion>
                                                        <votes>11</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="144353" author="kumasasa" created="Mon, 3 Mar 2014 16:36:45 +0100"  >&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="144339" author="branza" created="Mon, 3 Mar 2014 15:21:08 +0100"  >&lt;p&gt;Yes, villagers no longer change existing trades.&lt;/p&gt;</comment>
                            <comment id="144308" author="kumasasa" created="Mon, 3 Mar 2014 10:26:47 +0100"  >&lt;p&gt;But according to &lt;a href=&quot;https://bugs.mojang.com/browse/MC-349&quot; title=&quot;Villagers ignore data tags in trading&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-349&quot;&gt;&lt;del&gt;MC-349&lt;/del&gt;&lt;/a&gt; NBT data is still ignored ?!&lt;/p&gt;

&lt;p&gt;Anyway, is this issue obsolete with the new trading mechanics of 14wXX ?&lt;/p&gt;</comment>
                            <comment id="140776" author="torabi" created="Sun, 16 Feb 2014 10:49:51 +0100"  >&lt;p&gt;According to &lt;a href=&quot;https://bugs.mojang.com/browse/MC-44351&quot; title=&quot;Librarian Villagers sell multiple enchanted books&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-44351&quot;&gt;&lt;del&gt;MC-44351&lt;/del&gt;&lt;/a&gt;, it would appear that trading now takes NBT data into account, and that book trades will no longer be replaced.&lt;/p&gt;</comment>
                            <comment id="140763" author="baythan" created="Sun, 16 Feb 2014 10:00:32 +0100"  >&lt;p&gt;I believe the new trading mechanics have effectively made this bug obsolete. I think villagers no longer change their trades, not even to reduce the price of an old trade.&lt;/p&gt;</comment>
                            <comment id="133396" author="galaxy_2alex" created="Wed, 22 Jan 2014 00:21:32 +0100"  >&lt;p&gt;Is this still a concern in the &lt;em&gt;current development version of Minecraft&lt;/em&gt; &lt;b&gt;14w03b&lt;/b&gt; / Launcher version &lt;b&gt;1.3.8&lt;/b&gt; or later? If so, please &lt;em&gt;update the affected versions&lt;/em&gt; in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.&lt;/p&gt;</comment>
                            <comment id="129360" author="antofthy" created="Tue, 7 Jan 2014 00:14:58 +0100"  >&lt;p&gt;It is still a concern... nothing has changed.&lt;/p&gt;

&lt;p&gt;Simply put, because replacement trades only check for a lower price, the overall level of enchanted books only gets smaller until you are only left with a &apos;common&apos;, or cheap (5 Emerald) level 1 enchanted book.&lt;/p&gt;

&lt;p&gt;Basically librarians offering the better and rare enchanted books such as Sharpness-V, Smite-V, etc, will change to &apos;cheaper&apos; books with enchantments that are not nearly as good, and are far more &apos;common&apos;.&lt;/p&gt;

&lt;p&gt;A simple fix would be that if a enchanted book trade is &apos;changed&apos;, to ignore the price, and just change the enchantment, regardless of price or level of enchantment.&lt;/p&gt;

&lt;p&gt;WARNING: There is a seperate bug in that the price of some level V enchants where the price requested is larger than 64 Emeralds and thus unpayable in the current trading interface.  That should be fixed (capped at 64?) at the same time.&lt;/p&gt;</comment>
                            <comment id="121436" author="talven81" created="Tue, 26 Nov 2013 21:09:26 +0100"  >&lt;p&gt;Is this still a concern in the &lt;em&gt;current Minecraft version&lt;/em&gt; &lt;b&gt;1.7.2&lt;/b&gt; / Launcher version &lt;b&gt;1.3.4&lt;/b&gt; ? If so, please &lt;em&gt;update the affected versions&lt;/em&gt; in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.&lt;/p&gt;</comment>
                            <comment id="102399" author="shadeirou" created="Wed, 11 Sep 2013 21:15:18 +0200"  >&lt;p&gt;It may be that I am just unlucky, or it may be due to how many librarians I have, but now that I have experienced this bug I seem to be able to reproduce quite easily. Here are the steps I take to reproduce it:&lt;br/&gt;
1. Find a librarian&lt;br/&gt;
2. Trade with him until he sells an enchanted book (higher the price the better)&lt;br/&gt;
3. Refresh his trades&lt;br/&gt;
4. Check the enchanted book &lt;br/&gt;
5. If the book hasn&apos;t changed, go back to step 3.&lt;/p&gt;

&lt;p&gt;I can get video of this on multiple villagers if that would help.&lt;/p&gt;</comment>
                            <comment id="102367" author="torabi" created="Wed, 11 Sep 2013 17:27:11 +0200"  >&lt;p&gt;I imagine it remains unconfirmed both because it is difficult to test (random is random), and the description is poorly written, not clearly identifying the problem or its cause. I have attempted to remedy the latter problem with my explanation of the issue, but it&apos;s pretty wordy and complicated. Hopefully it will make the issue more clear to the next mod to check this issue.&lt;/p&gt;

&lt;p&gt;It would probably help if someone would try testing it. Find a village with a librarian, write down all their offers, and repeatedly trade with them, writing down any changes to the offers. With a large enough sample size, it should provide evidence that this is bugged. Creative mode or /give would speed up the process immensely.&lt;/p&gt;</comment>
                            <comment id="102345" author="shadeirou" created="Wed, 11 Sep 2013 15:47:37 +0200"  >&lt;p&gt;Indeed, I regret saying Mojang have been ignoring this issue. I do appreciate the work they are putting in to resolving all of Minecraft&apos;s bugs. My comment was merely a reflection of my frustration with this bug, its quite long life, and its unconfirmed status.&lt;/p&gt;</comment>
                            <comment id="102337" author="torabi" created="Wed, 11 Sep 2013 15:12:40 +0200"  >&lt;p&gt;They&apos;re not &quot;ignoring&quot; it. They&apos;re busy tackling the &lt;a href=&quot;https://mojang.atlassian.net/issues/?filter=10620&amp;amp;jql=project%20in%20(MC%2C%20MCL)%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20ASC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;2,613 &lt;b&gt;other&lt;/b&gt; unresolved issues&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a complicated issue, caused by a collision of multiple trading mechanics. The code doesn&apos;t really distinguish between the enchantments placed on the books &amp;#8211; other than to set the price based on the level of the enchantment. So an offer of a book with a particular enchantment can be replaced with a book with any other enchantment, because all it checks when generating an offer and determining whether to add a new one or replace an existing one is the item ID.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;The first component is &lt;a href=&quot;https://bugs.mojang.com/browse/MC-349&quot; title=&quot;Villagers ignore data tags in trading&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-349&quot;&gt;&lt;del&gt;MC-349&lt;/del&gt;&lt;/a&gt;: all potential offers for Enchanted Books are considered the same item, regardless of the enchantment or its level.&lt;/li&gt;
	&lt;li&gt;When generating a new offer, if the item matches an existing offer, it only replaces it if the price is better. If it&apos;s not better, nothing changes.&lt;/li&gt;
	&lt;li&gt;Enchanted books are priced differently than other items, based on enchantment level: (2 + level * 3 + random(0, level * 10 + 5)).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The result of these three components is that low-level books can easily replace higher-level books, but high-level books can never be priced low enough to ever replace some low-level offers. For example, the minimum cost for a level 5 enchantment is 17 emeralds. Once a librarian generates an offer for an enchanted book priced lower than that, they will never again offer a level 5 enchanted book. (Ranges for all levels, from the wiki: level 1: 5 &#8211; 19, level 2: 8 &#8211; 32, level 3: 11 &#8211; 45, level 4: 14 &#8211; 58, level 5: 17 &#8211; 71). Because of the random nature of generating offers, it&apos;s guaranteed that the more you trade with a librarian, the worse their offers will get. This is the exact opposite of how trading works for every other type of trade, including the librarian&apos;s offers for other types of items, in which it&apos;s guaranteed that offers will &lt;b&gt;never&lt;/b&gt; get worse, and, if you trade with a villager enough, you will eventually unlock all their potential trades, at the lowest possible prices.&lt;/p&gt;

&lt;p&gt;The enchanting offers provided by priests work entirely differently than enchanted books. The cost only ranges from 2-4, and is not related to the enchantment or its level. Offers can be replaced with a different enchantment, and that enchantment may be better or worse, but the full range (all enchantments that would cost 5-19 exp levels if you used a enchanting table) is always available for the offer generator to pick from, and nothing about the existing enchantment offer will ever exclude part of that range.&lt;/p&gt;

&lt;p&gt;It is almost certain that the behavior of enchanted book offers is an oversight, not an intentional deviation.&lt;/p&gt;</comment>
                            <comment id="102322" author="shadeirou" created="Wed, 11 Sep 2013 10:02:24 +0200"  >&lt;p&gt;I really wish that Mojang would stop ignoring this bug. This is one of the most disappointing things to happen to me in Minecraft in a long while. I spent many, many, MANY hours breeding and trading with librarian villagers in order to get an unbreaking book trade, as well as others. Then, I trade with the villager with unbreaking and his trades update. Fine, that is how it should be, but suddenly the unbreaking 3 book is gone and swapped out for knockback 1? What? Why??? This make absolutely no sense to me.&lt;/p&gt;

&lt;p&gt;This isn&apos;t just annoying, it is entirely inconsistent. No other villagers, with the possible exception of priests, change what they are selling, only the quantity sold/bought or emerald cost. &lt;/p&gt;

&lt;p&gt;I&apos;m not asking for the prices to drop, or for the trades to improve, but only for them to not completely change like this.     &lt;/p&gt;</comment>
                            <comment id="61719" author="gerbilcrab475" created="Sat, 20 Apr 2013 03:58:56 +0200"  >&lt;p&gt;Wow, trades should never get worse over time, that&apos;s just plain dumb.&lt;/p&gt;</comment>
                            <comment id="50766" author="corgano" created="Thu, 7 Mar 2013 19:26:51 +0100"  >&lt;p&gt;Natural would be them getting both worse and better. Only getting worse is bullhonkey, and only getting better is OP&lt;/p&gt;</comment>
                            <comment id="32019" author="fmk" created="Wed, 2 Jan 2013 02:01:08 +0100"  >&lt;p&gt;I somewhat doubt a trade only ever getting worse when it&apos;s updated is working as intended, since it&apos;s the complete opposite of how every other trade works.&lt;/p&gt;

&lt;p&gt;It&apos;s like saying paper cost going from 17-&amp;gt;20-&amp;gt;30-&amp;gt;40-&amp;gt;64 when everything else lessens in cost the more you trade would be working as intended.&lt;/p&gt;</comment>
                            <comment id="31955" author="banana478" created="Tue, 1 Jan 2013 18:06:38 +0100"  >&lt;p&gt;Works as intended. Get more villagers if you want more trades.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10501" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Game Mode</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10304"><![CDATA[Survival]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0mzkn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>