From 64168d103d0cbf44a8337b29334bbc3c23aac74a Mon Sep 17 00:00:00 2001 From: ipdnaeip Date: Fri, 3 Apr 2026 12:09:23 +0200 Subject: [PATCH] AllyDesignationSystem update Added isOnSameTeam check to isValidTarget and isAllied --- .../electroblob/wizardry/util/AllyDesignationSystem.java | 7 +++++++ 1 file changed, 7 insertions(+) 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();