More Detailed Visual Description In The Attachments below:
Description: I was trying to make a boss on realms and had it rigged to machine to summon lightning on zombies nearby, and it worked. I left the game and it left its team.
Steps to replicate:
1. Do this command:
/summon villager ~ ~1 ~ {CustomName:"TESTIFICATE",CustomNameVisible:1,Tags:["cool"],Profession:5,Age:9000.1,ForcedAge:9000.1,ArmorItems:[{},{},{},{id:"minecraft:lit_pumpkin",Count:1b}],ArmorDropChances:[0.085F,0.085F,0.085F,0.0F],PersistenceRequired:1,CanPickUpLoot:1b,Silent:1,Glowing:1b,Team:"TESTIFICATE"}
2. Hook the mob up with a machine with the following command:
/execute @e[tag=cool] ~ ~ ~ /execute @e[type=zombie,r=100] ~ ~ ~ /summon lightning_bolt ~ ~ ~
3. I placed zombies.
4. Left game.
5. Came back on and it left its team.
Related issues
Attachments
Comments

Thank you for your report!
However, this issue is a Duplicate of MC-89610.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki