AllyDesignationSystem update
Added isOnSameTeam check to isValidTarget and isAllied
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user