Bootleg fix for NPC aggro crash
This commit is contained in:
1 parent
9011688d2a
commit
fd0bfda8a7
1 file changed
+9
-5
+9
-5
@@ -20,12 +20,16 @@ public class NpcAggressive {
|
||||
};
|
||||
|
||||
public static boolean isAggressive(int i) {
|
||||
boolean aggressive = NpcHandler.npcs[i].inWild() || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || FightCaves.isFightCaveNpc(i);
|
||||
for (int element : AGGRESSIVE_MONSTERS) {
|
||||
if (NpcHandler.npcs[i].npcType == element || aggressive) {
|
||||
return true;
|
||||
try {
|
||||
boolean aggressive = NpcHandler.npcs[i].inWild() || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || FightCaves.isFightCaveNpc(i);
|
||||
for (int element : AGGRESSIVE_MONSTERS) {
|
||||
if (NpcHandler.npcs[i].npcType == element || aggressive) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (NullPointerException) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user