diff --git a/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java b/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java index b8395deb..afff556f 100644 --- a/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java +++ b/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java @@ -117,6 +117,9 @@ public final class AllyDesignationSystem { // Always return true if the attacker is null - this must be after the target null check! if(attacker == null) return true; + // Teammates are allies + if(attacker.isOnSameTeam(target)) return false; + // Tests whether the target is the attacker if(target == attacker) return false; @@ -220,6 +223,10 @@ public final class AllyDesignationSystem { if(allyOf instanceof EntityPlayer && isOwnerAlly((EntityPlayer)allyOf, pet)) return true; } + if(possibleAlly.isOnSameTeam(allyOf)) { + 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();