fix: Fixed NPE crash for isAllied() function, causing world deadlocks (#906)

This commit is contained in:
Xvareon
2026-05-05 17:30:20 +08:00
committed by GitHub
parent bbe4634535
commit 39f8d0ee7e
@@ -206,6 +206,10 @@ public final class AllyDesignationSystem {
* generally used to determine targets for healing or other group buffs. */
public static boolean isAllied(EntityLivingBase allyOf, EntityLivingBase possibleAlly){
if (allyOf == null || possibleAlly == null) {
return false;
}
// Owned entities inherit their owner's allies
if(allyOf instanceof IEntityOwnable){
Entity owner = ((IEntityOwnable)allyOf).getOwner();