mojira.dev
MC-311005

The trading UI gets desynced if the villager is given trades using commands

Trading UI window gets de synced if the villager is leveled up and then given a trade by commands while UI is open.
In our datapack we run a function that targets the cartographer through hidden advancements and adds trades to their system additionally to the existing trades, outside of the datadriven trade system. With 26.3 snapshot changes, the UI does not need to close anymore for the trades to be updated for player. However we relied on the player having to close the system and this causes now the UI to de sync. in the attachments i added a video showcasing how its expected to work and the actual bug

Expected result: The cartographer gains a new trade at the top of the list with a new trade that does not impact the existing trades
See attachment 2026-08-12 13-31-02.mp4

What actually happens: the trade is added but doesn't show up in the UI yet, which causes the intractable trade fields to not work correctly anymore until the player leaves the UI and Re-enters it
See attachment 2026-08-12 13-38-46.mp4

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Do you have a minimal datapack available to reproduce this?

Nova Wostra

(Unassigned)

Unconfirmed

26.3 Snapshot 8

26.3 Snapshot 9

Retrieved