mojira.dev
MC-180407

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

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

Comments 0

No comments.

AlexMCool

mgatland

Community Consensus

Normal

Data Packs

20w17a, 20w18a

20w19a

Retrieved