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


    • Confirmed
    • Trading

      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


      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.

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

            hkniberg hkniberg
            Trevor K Trevor Koenig
            51 Vote for this issue
            24 Start watching this issue