random delay between mob chase

This commit is contained in:
2023-10-16 15:07:39 -05:00
parent cb89cc17be
commit d0374a2dea
+1 -1
View File
@@ -898,7 +898,7 @@ public class MobAI {
if(mob.getTimestamps().containsKey("lastChase") == false) if(mob.getTimestamps().containsKey("lastChase") == false)
mob.getTimestamps().put("lastChase",System.currentTimeMillis()); mob.getTimestamps().put("lastChase",System.currentTimeMillis());
else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + 1000) else if(System.currentTimeMillis() < mob.getTimestamps().get("lastChase").longValue() + (750 + ThreadLocalRandom.current().nextInt(0,500)))
return; return;
mob.getTimestamps().put("lastChase",System.currentTimeMillis()); mob.getTimestamps().put("lastChase",System.currentTimeMillis());