random delay between mob chase
This commit is contained in:
1 parent
cb89cc17be
commit
d0374a2dea
1 file changed
+1
-1
@@ -898,7 +898,7 @@ public class MobAI {
|
||||
|
||||
if(mob.getTimestamps().containsKey("lastChase") == false)
|
||||
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;
|
||||
|
||||
mob.getTimestamps().put("lastChase",System.currentTimeMillis());
|
||||
|
||||
Reference in new issue
Block a user