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

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 20w17a, 20w18a
    • 20w19a
    • None
    • Community Consensus
    • Data Packs
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:
              CHK: