early exit for pets attacking a null target

This commit is contained in:
2024-05-31 18:32:53 -05:00
parent 722fd14be5
commit d22ba7b89d
+2
View File
@@ -175,6 +175,8 @@ public class MobAI {
public static void attackMob(Mob mob, Mob target) {
try {
if(mob == null || target == null)
return;
if (mob.getRange() >= 30 && mob.isMoving())
return;