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

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w19a
    • 20w17a, 20w18a
    • None
    • Community Consensus
    • Data Packs
    • Normal

      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.

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

              Created:
              Updated:
              Resolved:
              CHK: