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

Villager trades' "buy" slot does not support removing components, unlike the "sell" slot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21
    • None
    • Confirmed
    • Commands

      When making custom trades with ingredients that have components like in this case jukebox_playable and food removed (e.g. to use it as custom currency), the tooltip displays info about music disc song, food value, etc. This is supposed to be paired with custom texture as well so tool tip that displays info which is not relevant (because ingredient actually must have those default components removed) makes it seem wrong and confusing.
      This seem to only affect buy slot, item in sell slot shows correct tooltip.
       

      Steps to reproduce:

      1. Use your favorite method to make custom villager trade that trades item with default component removed that would have extra tool tip info like the music disc's song name
        • Some examples:
          /give @s music_disc_cat[!jukebox_playable]
          /give @s music_disc_cat[!rarity]
      2. Swap the villager trade buy/sell slot with item in hand to test trade in action:
        1. Buy slot:
          /data modify entity @n[type=villager] Offers.Recipes[0].buy set from entity @s SelectedItem
        2. Sell slot:
          /data modify entity @n[type=villager] Offers.Recipes[0].sell set from entity @s SelectedItem
      3. Open villager UI and inspect trade ingredient tooltip

      Observed result:
      When the disc that is not usable in jukebox is present in trade it correctly hides song name when item is sell slot, but still shows song name when disc is in buy slot:


      When the disc that has its rarity component removed it still shows the Rare rarity when disc is in sell slot, unlike the buy slot:


      Running /data get @n[type=villager] Offers.Recipes[0].buy and /data get @n[type=villager] Offers.Recipes[0].sell respectively shows that the buy slot retains the removal of components, while the sell slot does not.

      Expected result:
      The sell slot retains "removed" components, like the buy slot.

            Unassigned Unassigned
            Laurixas Lauris
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: