Minecraft wiki entry for Sword, associated text: Piglins are attracted to golden swords and run toward any golden swords on the ground, and inspect it for 6 to 8 seconds before putting it in their inventory.