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

Villager trade GUI shows incorrect price when a discount is applied on servers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14
    • Confirmation Status:
      Confirmed
    • Category:
      Trading

      Description

      The bug

      On servers, all players (on LAN servers, all players except the host) get displayed an incorrect price for discounted trades. Instead of the original price being displayed crossed out and the discounted price standing next to it, the discounted price is crossed out and an incorrect price stands next to it (that price being the original price discounted twice).

      This is how it looks to the host of a LAN world / to the server:

      This is how it looks to all the other players:

      To reproduce

      by Johnibur

      1. Create a new singleplayer world (superflat for convenience, creative).
      2. Summon on a safe spot a villager, assign him the mason profession by placing down a stonecutter.
      3. Open the world to you LAN and let a second account join.
      4. Give the hero of the village status effect to both players:
         /effect give @a hero_of_the_village 999 1 true 
      5. Try to trade with the mason one account, then the other.
      6. The guest account is displaying the incorrect price

      Video

      Server VIllager Trading.mp4

      Original report

      Server side inventories do not apply the advertised price, instead applying the original full price. This is applicable to both buy and sell trades. If the world is copied to saves folder and played as a single player world, the proper price will be applied to the trade.

      How to produce:
      1. Download server jar file from most recent patch notes page.
      2. Create server.
      3. Trade with villagers on server.

      Side Note: This bug also affects Realms servers.

        Attachments

        1. client.png
          client.png
          3 kB
        2. host.png
          host.png
          3 kB
        3. Server VIllager Trading.mp4
          2.73 MB
        4. trade.png
          trade.png
          3 kB

          Issue Links

            Activity

              People

              • Assignee:
                hkniberg [Mojang] Henrik Kniberg
                Reporter:
                Trevor K Trevor Koenig
              • Votes:
                51 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: