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
- Enable the attached datapack, which replaces the bartering loot table with a loot table that drops stone and dirt
- 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.
2020-04-24, 01:25 PM
2020-05-06, 12:57 PM
2020-05-06, 12:49 PM
3
2