Bartering

Bartering is an action the player can perform with piglins to obtain various items.

Mechanics
To barter with a piglin, either throw by dropping a gold ingot near an adult piglin or a gold ingot on it. After the piglin takes the gold ingot and examines it for six seconds $$ or eight seconds $$, it tosses a random item to the player. Piglin brutes ignore gold ingots and baby piglins will take the ingot without giving anything in return.

Piglins pick up many other items that are made of gold; however, ingots are the only items that piglins accept for bartering. Baby piglins are incapable of bartering and treat gold ingots like any other gold items.

Hitting a piglin causes it to "confiscate" the ingot; the piglin does not complete the barter. It cannot be bartered with again unless it puts another item in its inventory. Piglins who are killed in one hit before they finish examining always drop the ingot.

Bartering is controlled by the loot table. If the gamerule  is false, piglins only barter when the player uses a gold ingot on them.



Items bartered
The item the piglin throws may be one of the following:

Trivia

 * Piglins sometimes pick up and equip the iron boots enchanted with Soul Speed that they have just offered while bartering. If the player wants to obtain the iron boots without killing the piglin, they can offer the piglin a pair of golden boots, and the piglin will discard the iron boots in favor of the golden pair.