Minecraft wiki entry for Advancement_guide, associated text: However, it should be noted that any nearby piglins that can can see you will attack you when you open the chest. So to safely open the chest, you should either find a chest with no piglins around, or block the piglins off so they can't get to you.