mojira.dev
MC-148454

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

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:

[media]

This is how it looks to all the other players:

[media]

To reproduce

by @unknown

  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

[media]

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.

Linked issues

MC-10809 Hearts from breeding animals appear "behind" water and ice Resolved MC-147225 Villager trade shows wrong prices Resolved MC-147971 Villagers do not show the real discount with effect "Hero of the village" Resolved MC-148333 Villager UI destroying trade items when multi-trading Resolved MC-148803 Villager Trade reverses after closing trade screen Resolved

Attachments

Comments 25

Can confirm.
You should update the title for more visibility, something like: "Villager trades do no apply discount on dedicated servers".

Great Idea! If you don't mind I'm going to use your title.

Can confirm for 1.14-pre5.

Can confirm for 1.14.

Villager trades do apply discount, but it is displayed wrongly. Trade cost is (original_price - x), but it displayed as (original_price - x - x).

15 more comments

I cannot reproduce this in 1.14.1-pre1 and assumed that the 1.14.1-pre1 being added to affected versions in MC-151282 was a mistake. @unknown, if you want your ticket to be reopened, please leave a comment on that ticket.

I also was unable to reproduce this in 1.14.1-pre2, The trades and their GUIs are working on my dedicated server.

The same issue still exists, but only for villagers that previously were zombie villagers and have been cured. See MC-151282.

Still A Major Problem, Mods no help marking everything resolved.

@unknown, this particular issue has been fixed in 1.14.1 Pre-Release 1, though a similar issue still exists. A report about that issue, MC-151282, is still left open.

Trevor Koenig

migrated

Confirmed

Trading

Gui, server, villager-trade

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

Minecraft 1.14.1 Pre-Release 1

Retrieved