If a player is in the same team as a mob, and said team has "friendlyFire" set to "false", then normally it won't attack you. But Piglins, Hoglins, Piglin Brutes, and Zoglins (this one might be intended) completely ignore teams.
How to recreate:
/team add test
/team modify test friendlyFire false
Spawn Piglin
Spawn Zombie
/team join test @e
The Zombie will act passive towards you, the Piglin will attack you.
Linked issues
duplicates 1
Attachments
Comments 2
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord
Duplicate of MC-172304.