Kyle Egli
- fmk
- fmk
- Europe/Stockholm
- Yes
- No
Librarian Villagers will sometimes offer Enchanted Book's with an emerald cost higher than 64, which is impossible to trade for.
Example: Bane of Arthropods V for 66 Emeralds. (Uploaded zip, coords 7147, 38, -4835)
Due to how trade generating works, it's impossible for for Enchanted Books to get better/change at all after a certain point.
To explain: Villagers will only update a trade if the emerald cost is less than the current one. So for stuff like tools, armor, enchants, and etc that works fine, but for enchanted books it becomes an issue.
Let's say you have Librarian Villager selling Thorns 1 for 5 Emeralds, Thorns 3 for 15 Emeralds would obviously be better, but it can never be an option, nor will the trade be able to change ever in this case, since 5 emeralds is the minimum cost of an enchanted book. Alternatively, if you have Thorns 3 for 15 Emeralds, it's very likely you'll get a random level 1 or 2 enchant when updating the trades, rather than something actually useful.
I would upload an example world, but it's somewhat hard to show through that.
Due to how trade generating works, it's impossible for for Enchanted Books to get better/change at all after a certain point.
To explain: Villagers will only update a trade if the emerald cost is less than the current one. So for stuff like tools, armor, enchants, and etc that works fine, but for enchanted books it becomes an issue.
Let's say you have Librarian Villager selling Thorns 1 for 5 Emeralds, Thorns 3 for 15 Emeralds would obviously be better, but it can never be an option, nor will the trade be able to change ever in this case, since 5 emeralds is the minimum cost of an enchanted book. Alternatively, if you have Thorns 3 for 15 Emeralds, it's very likely you'll get a random level 1 or 2 enchant when updating the trades, rather than something actually useful.
I would upload an example world, but it's somewhat hard to show through that.
Edit: Thinking on it, it'd be rather simple to fix. (Assuming it is a bug/programming oversight that needs to be fixed, anyways)
You'd just make all enchants relative to a Level 5 scale, so enchants that only go up to:
Level I would be Level 5 in calculations.
Level II would be Level 2 and 5 in calculations.
Level III would be Level 1, 3, and 5 in calculations.
Level IV would be Level 1, 2, 4, and 5 in calculations.
Level V would be the base, so no changes needed.Then you'd just check if the level is >= current enchanted book offer and if emerald cost is <= current emerald cost, and if so update the offer with the new one.
In the end, this would mean a librarian villager you've invested in heavily (rather than just throwing them out the instant they give you a bad trade) would only sell you Sharpness 5/Silk Touch 1/Protection 4/Thorns 3/etc for the low cost of 17 emeralds always, which would fall in line with how other trades work.
This would also mean Silk Touch/Infinity/Flame books would cost as many emeralds as if they were level 5, rather than being as little as 5 emeralds simply because there's only one enchantment level possible for them.
Also, sorry if suggesting a potential fix to a potential bug/programming oversight isn't allowed (I didn't see anything about it.) A mod can feel free to just remove my edit if so.
Due to how trade generating works, it's impossible for for Enchanted Books to get better/change at all after a certain point.T
o explain: Villagers will only update a trade if the emerald cost is less than the current one. So for stuff like tools, armor, enchants, and etc that works fine, but for enchanted books it becomes an issue.Let's say you have Librarian Villager selling Thorns 1 for 5 Emeralds, Thorns 3 for 15 Emeralds would obviously be better, but it can never be an option, nor will the trade be able to change ever in this case, since 5 emeralds is the minimum cost of an enchanted book. Alternatively, if you have Thorns 3 for 15 Emeralds, it's very likely you'll get a random level 1 or 2 enchant when updating the trades, rather than something actually useful.
I would upload an example world, but it's somewhat hard to show through that.
Edit: Thinking on it, it'd be rather simple to fix. (Assuming it is a bug/programming oversight that needs to be fixed, anyways)
You'd just make all enchants relative to a Level 5 scale, so enchants that only go up to:
Level I would be Level 5 in calculations.Level II would be Level 2 and 5 in calculations.
Level III would be Level 1, 3, and 5 in calculations.
Level IV would be Level 1, 2, 4, and 5 in calculations.
Level V would be the base, so no changes needed.Then you'd just check if the level is >= current enchanted book offer and if emerald cost is <= current emerald cost, and if so update the offer with the new one.
In the end, this would mean a librarian villager you've invested in heavily (rather than just throwing them out the instant they give you a bad trade) would only sell you Sharpness 5/Silk Touch 1/Protection 4/Thorns 3/etc for the low cost of 17 emeralds always, which would fall in line with how other trades work.
Th
is would also mean Silk Touch/Infinity/Flame books would cost as many emeralds as if they were level 5, rather than being as little as 5 emeralds simply because there's only one enchantment level possible for them.
Also, sorry if suggesting a potential fix to a potential bug/programming oversight isn't allowed (I didn't see anything about it.) A mod can feel free to just remove my edit if so.Edit: Replaced my crummy explanation with a better one, courtesy of Torabi.
This is a complicated issue, caused by a collision of multiple trading mechanics. The code doesn't really distinguish between the enchantments placed on the books – 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.
The first component is
MC-349: all potential offers for Enchanted Books are considered the same item, regardless of the enchantment or its level.
When generating a new offer, if the item matches an existing offer, it only replaces it if the price is better. If it's not better, nothing changes.
Enchanted books are priced differently than other items, based on enchantment level: (2 + level * 3 + random(0, level * 10 + 5)).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 – 19, level 2: 8 – 32, level 3: 11 – 45, level 4: 14 – 58, level 5: 17 – 71). Because of the random nature of generating offers, it'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's offers for other types of items, in which it'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.
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.
It is almost certain that the behavior of enchanted book offers is an oversight, not an intentional deviation.
Added the file. Note that I deleted all the unrelated chunks to reduce file size, coords of the villager are x: 7147, y: 38, z: -4835
Yes, the villager / world in question is from a bukkit server with some plugins, but none of which affect the villager trading calculations. As I'd rather not spend another 10+ hours of trying to get lucky, especially since someone has already dug into the code on how the trade costs are calculated. ( http://www.minecraftwiki.net/wiki/Talk:Trading#Enchanted_Books )
Edit: Though if someone else wants to get another occurrence of this, be my guest.
Well not exactly, since the ranges are based on the enchantment level too:
Level 1: 5-20
Level 2: 8-33
Level 3: 11-46
Level 4: 14-59
Level 5: 17-71
Oh, I had misread, my bad.
I somewhat doubt a trade only ever getting worse when it's updated is working as intended, since it's the complete opposite of how every other trade works.
It's like saying paper cost going from 17->20->30->40->64 when everything else lessens in cost the more you trade would be working as intended.
I can second that there is in fact a bug with this, though what the bug is exactly is uncertain.
Essentially, while in Survival the only Enchanted Books that you can combine are invalid combinations, as such for Enchanted Books:
You can NOT combine Silk Touch I with Efficiency IV.
You can NOT combine Efficiency III with Efficiency III.
You CAN combine Sharpness I-V with Smite I-V, but all you'll get is whatever was in slot 1.
You CAN combine Protection III with Blast Protection IV, but same as last.
Etc.
So the bug is either the fact you are able to combine Enchanted Books at all while in Survival, or the fact you can ONLY combine invalid Enchanted Book sets while in survival, rather than all valid combinations.
This is not a bug, the hopper connected to whichever block face you place it against, and will deposit to that direction; So in this case it'll deposit to where the sandstone is if replaced with a chest.
You mean a 2x2 block of stairs? Because that's what you're showing in the picture, and those work completely fine so long as you place the stairs facing the right ways.
Well, there are two somewhat simple solutions to the issue really, adding a Pipe item, which would also keep the Hopper 'simple', or giving Minecarts more love. Though I'm sure Dinnerbone will have his own ideas on the matter, and sure, you could currently use dispensers and water and a space consuming setup as a filter to get a similar effect to pipes, but that doesn't work for projectiles or unstackable items, I figure I'd put in my 2 cents on the matter.
Pipes could have 2-6 slots (or however many one thinks would be needed), 1-5 to transfer items with, and the other to act as a filter (which if empty would let all items through), then the problem is solved. Though to solve the issue of pipes not knowing which way to go, you'd want to make the face the pipe is placed against an input-only face, which would allow for the other 5 directions to either input items or receive items. Then you'd just prioritize items going into filtered pipes first, and unfiltered pipes last.
Of course, the pipes wouldn't be able to transfer items upwards, only sideways and down, as is logical and how hoppers already are, and thus still requiring minecarts or the like to move items upwards. Crafting recipe could probably be how rails are done but turned on their side, with a nether quartz replacing the stick, and could give 4-8 pipes per.
More importantly, adding pipes would give a nice bit of aesthetics to moving items around, rather than the clunky mess that a chain of hoppers currently is.
Alternatively, more functionality to minecarts, rails, and etc to make it possible to do something along the lines of the suggested pipes. Haven't really thought on it that too much though, so couldn't give any ideas on how one would do that.
Because you summoned it with a quantity of zero, which is something that Minecraft just really doesn't like. Could be considered a bug that the amount doesn't default to 1, though.
Yes, it appears the new trading properly caps the maximum amount of emeralds at 64.