Waiting

public class Waiting

Utilities for waiting (variable sleeps based on a condition and static waits). All numbers are milliseconds.

Functions

wait
Link copied to clipboard
static void wait(int millis)
Waits for the specified milliseconds
waitNormal
Link copied to clipboard
static void waitNormal(int mean, int std)
Waits for a random amount of time, using the mean/sd parameters in a normal distribution to pick a random value
waitUniform
Link copied to clipboard
static void waitUniform(int min, int max)
Waits for a random amount of time, using the min/max range in a uniform distribution to pick a random value
waitUntil
Link copied to clipboard
static boolean waitUntil(BooleanSupplier condition)
Waits until the specified condition is true, or times out after around 10 seconds
static boolean waitUntil(int timeout, BooleanSupplier condition)
Waits until the specified condition is true, or the timeout limit is reached
static boolean waitUntil(int timeout, int step, BooleanSupplier condition)
Waits until the specified condition is true, or the timeout limit is reached
waitUntilAnimating
Link copied to clipboard
static boolean waitUntilAnimating(int timeout)
Waits until my player is animating, or the timeout limit is reached
waitUntilInArea
Link copied to clipboard
static boolean waitUntilInArea(Area area, int timeout)
Waits until my player is in the specified area, or the timeout limit is reached