-
Bug
-
Resolution: Unresolved
-
None
-
1.14.4, 1.15.1, 1.19.2, 24w46a, 1.21.4
-
None
-
Confirmed
-
Survival
-
Trading
The bug
When shift-clicking a trade, it sometimes buys a subsequent trade if there is enough remaining materials to buy the 2nd trade but not the first trade. This only occurs when the item ID is the same. In survival mode, this affects librarians with two enchanted book trades where shift-clicking the first trade can lead to the player receiving both the first and second book if its available for buying.
Steps to reproduce
- Summon the following villager:
/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},PersistenceRequired:1,Offers:{Recipes:[{buy:{id:emerald,count:63},buyB:{id:book,count:1},sell:{id:golden_apple,count:1,components:{custom_name:'{"text":"1"}'}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,count:1},buyB:{id:book,count:1},sell:{id:golden_apple,count:1,components:{custom_name:'{"text":"2"}'}},rewardExp:0b,maxUses:9999999}]}}
- Shift click the first trade with a stack of emeralds + 2 books
- Observe that you receive two different items, each from the two available trades