mojira.dev
MC-159573

Villager trading gossip value only goes up by 2 when trading multiple times using shift-click

The bug

The value should increase by 2*(trades done), but when doing the trades using shift-click it only counts is as one trade.

How to reproduce

  1. Summon a villager and place a working site block, e.g. a brewing stand

  2. Check their gossip

    /data get entity @e[type=villager,limit=1,sort=nearest] Gossips

    ✔ It is empty as expected

  3. Trade with them but use the trade multiple times by shift clicking it

  4. Check the gossip of the villager again

    /data get entity @e[type=villager,limit=1,sort=nearest] Gossips

    ❌ The trading entry only has a score of 2

Code analysis

Using Mojang names

Trading gossip is only added every tick by net.minecraft.world.entity.npc.Villager.customServerAiStep() instead of directly after the trade.

Attachments

Comments 2

Can confirm in 20w51a.

Affects 24w12a:

[media]

TheKrics02

(Unassigned)

Confirmed

(Unassigned)

1.14.4, 1.15.1, 1.16.4, 20w51a, 1.21.4

Retrieved