The bug
Piglins, piglin brutes, hoglins, zoglins and axolotls can attack or be attacked in the same team. They will also attack players, wither skeletons and withers that are in the same team.
How to reproduce
Piglin hunting hoglin teammates
Create a team
Summon piglin and hoglin with the
Team
tagWait for the piglins to become hungry
→ ❌ Eventually, the hungry piglin will have to hunt its own teammate for food, and the hoglin will retaliate on its teammates.
Zoglin attacking teammates
Create team
Summon zoglin with the
Team
tagSpawn any random mob in the same team where the zoglin is
→ ❌ The zoglin will automatically attack its teammates.
Piglin Brute attacking teammates
Create team
Summon brute with the
Team
tagAdd player to the
Team
→ ❌ The brute will automatically attack, despite being in the same team.
Linked issues
is duplicated by 20
relates to 3
Attachments
Comments 40
I mean do mobs like piglins attack other entities (e.g. hoglins) on their team, because it seems in the comments you've only tested it with goats
Not fully fixed: piglins still attack wither skeleton teammates. See https://bugs.mojang.com/browse/MC-225908 for details as it is a separate report.
Also https://bugs.mojang.com/browse/MC-225907 for zoglins
They will also try to attack players and wither skeletons even if they are on the same team, which is inconsistent with the team behaviour displayed by every single other hostile mob in the game