feat: Mind controlled creatures are considered allies by AoE spells. Fixes #890

This commit is contained in:
WinDanesz
2025-08-31 14:56:41 +02:00
parent 5d5acf253b
commit f817f06dbe
@@ -220,6 +220,16 @@ public final class AllyDesignationSystem {
if(allyOf instanceof EntityPlayer && isOwnerAlly((EntityPlayer)allyOf, pet)) return true;
}
// Check if the possibleAlly is mind controlled by the allyOf entity
if(possibleAlly instanceof EntityLiving && possibleAlly.isPotionActive(WizardryPotions.mind_control)){
NBTTagCompound entityNBT = possibleAlly.getEntityData();
if(entityNBT != null && entityNBT.hasUniqueId(MindControl.NBT_KEY)){
Entity controller = EntityUtils.getEntityByUUID(possibleAlly.world, entityNBT.getUniqueId(MindControl.NBT_KEY));
return controller == allyOf;
}
}
return false;
}