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

Piglin bartering is limited to dropping a single item stack from the loot table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 20w17a, 20w18a
    • Fix Version/s: 20w19a
    • Labels:
      None
    • Confirmation Status:
      Community Consensus
    • Category:
      Data Packs
    • Mojang Priority:
      Normal

      Description

      The bug

      When modifying the bartering loot table to drop multiple (different items), only the first item is dropped.

      How to reproduce

      1. Enable the attached datapack, which replaces the bartering loot table with a loot table that drops stone and dirt
      2. Barter with a piglin -> it'll only give the dirt.

      Code analysis

      When looking at the decompiled code using Mojang's mappings, PiglinAI.getBarterResponseItem only returns the first entry of the ItemStack list.

        Attachments

          Activity

            People

            Assignee:
            mgatland [Mojang] Matthew Gatland
            Reporter:
            AlexMCool Alex³
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: