If the player distracts them with a gold item and equips a piece of gold armor while the piglin is examining the item, then the piglin ceases hostility. They may also cease hostility if distracted enough times.