maruohon / itemscroller

A client-side Minecraft mod that adds various convenient ways of moving items within inventory GUIs, such as scrolling over stacks to move single items to or from it
GNU Lesser General Public License v3.0
149 stars 77 forks source link

[Bug] VillagerTradeFavorites trades a non favorited trade if no favorite trades are possible #64

Open GabbageFilms opened 3 years ago

GabbageFilms commented 3 years ago

When you press the villager trade favorites key and none of the favorited trades are possible, non favorited trades that are possible are executed instead.

SkeletalPrints commented 3 years ago

I think this is the same bug or a related one: When trading for a book that costs 43 emeralds(favored) and there is another book trade(not favored) for 17 emeralds after the first one is traded once the other book trade is traded. My idea of a fix is hitting "space" or putting refiling emeralds in the trading slot after each trade.

GabbageFilms commented 3 years ago

I think this is the same bug or a related one: When trading for a book that costs 43 emeralds(favored) and there is another book trade(not favored) for 17 emeralds after the first one is traded once the other book trade is traded. My idea of a fix is hitting "space" or putting refiling emeralds in the trading slot after each trade.

Yes I think so too. Since making this bug report I've noticed the same issue can occur when you are using the right click to trade all feature, so its not tied to the trade favorites function.

For example, I'm trying to trade for a enchanted book when my inventory has emeralds but not normal books. When I right click to do attempt to trade it conducts a trade for something like glass which requires only emeralds. So whatever the villager trade function is doing does not check to see if the trade is possible, and just goes to what can be traded with the similar item.

maruohon commented 3 years ago

I'm having difficulties trying to reproduce this issue. Even if I only have emeralds in my inventory and I try to right click trade with locked or unlocked book trades, it does not trade for example glass. 2021-08-23_23 13 06

I know at least in 1.12.2 and before (probably also in 1.13.2 still) the trade GUI could select another matching trade other than the currently selected trade. But testing this in 1.17.1 single player I can't get it to trade other offers than the selected one. Are you playing on a server, and if so, what type of server? It's not an older server version via ViaVersion or Multiconnect or something like that?

GabbageFilms commented 3 years ago

I'm having difficulties trying to reproduce this issue. Even if I only have emeralds in my inventory and I try to right click trade with locked or unlocked book trades, it does not trade for example glass.

Try doing it on a villager with a bookshelf trade that seems to be doing it for me I misremembered the glass. Perhaps since bookshelf has book in it it thinks that it's the same somehow? I'm playing on paper 1.17.1.

SkeletalPrints commented 3 years ago

https://user-images.githubusercontent.com/62715490/131008243-bb431d6f-be1d-4e3d-95b4-5c5c1b6ac18a.mp4

fooeyround commented 2 years ago

This Might Be Partly From ItemScroller Thinking it can trade more but the the slot only has emeralds for the other book, partly Vanilla Partly Spigot/Paper, and partly because Of how Itemscroller Checks if it can trade again.