Minecraft wiki entry for Nether_survival, associated text: Piglins are scared of all soul fire items, which includes lit soul campfires, soul fire, soul torches, and soul lanterns. They are also scared of zoglins and zombified piglins. They ignore all items that usually scare them when hostile, except for zombified piglins, meaning that everything besides zombified piglins only scare idle/non-attacking piglins. Placing zombified piglins in a trap is not normally viable because being mobs in the hostile category, they despawn after the player is outside a 128 block radius. Naming a zombified piglin with a name tag prevents this. Keeping idle piglins away is actually useful because opening chests inside your house angers them. The best solution, if you don't have a name tag, is to just wear gold armor and not do anything to provoke piglins. If provoked, they cease hostilities in 30 seconds if you do nothing to further provoke them.