Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-215441

If player doesn't have any books in their inventory, a different trade is selected when clicking on an enchanted book trade

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.5, 1.17, 1.17.1, 1.19.2, 22w46a, 1.20 Release Candidate 1, 1.20.4
    • Confirmed
    • Trading

      The Bug:

      When trying to trade an "unbreaking 2" book from a Journeyman Librarian for 25 emeralds and one book, it didn't show me the empty slot like it should, because I didn't have the book, but it worked as if I selected the next trade: 9 emeralds for one bookshelf, and when I tried to buy the bookshelf it worked and cost me 9 emeralds. My other Librarian villagers worked normally when I tried. I tried relogging into the world and then relogging into the game, but it did not help.

      Steps to Reproduce:

      1. Place down a command block and input the following command into it in order to summon a villager with the appropriate trades.
        /summon minecraft:villager ~1 ~-0.5 ~1 {NoAI:1b,Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:5b},buyB:{id:"minecraft:book",Count:1b},sell:{id:"minecraft:enchanted_book",Count:1b,tag:{StoredEnchantments:[{lvl:3s,id:"minecraft:sharpness"}]}},maxUses:999},{buy:{id:"minecraft:emerald",Count:9b},sell:{id:"minecraft:bookshelf",Count:1b},maxUses:999}]}}
      2. Obtain a stack of emeralds and activate the command block.
      3. Make sure that you don't have any books within your inventory and click on the enchanted book trade.
      4. Take note of how a different trade is selected.

            Unassigned Unassigned
            cheetah3333 Emilia Ron
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: