Kotlin utilities for Quilt mod development
//kettle/coffee.cypher.kettle.scheduler/TickingScheduler
[jvm]
class TickingScheduler<T : Any>
A scheduler object capable of executing multiple Tasks and providing them with contexts of type T.
TickingScheduler | [jvm] constructor() |
Name | Summary |
---|---|
tasks | [jvm] val tasks: List<Task<T>> Tasks currently being managed by this scheduler. |
Name | Summary |
---|---|
addTask | [jvm] fun addTask(task: Task<T>, start: Boolean = false) Adds a new task to this scheduler. |
removeTask | [jvm] fun removeTask(task: Task<T>) Removes the specified task from this scheduler. |
task | [jvm] fun <T : Any> TickingScheduler<T>.task(config: AttachedTaskBuilder<T>.() -> Unit): Task<T> Creates a new task on the receiver scheduler described by the provided config with the use of other DSL functions. |
tick | [jvm] fun tick(newContext: () -> T, updateContext: (T) -> Unit = {}) Executes all tasks registered on this scheduler until they finish or suspend. |
tick | [jvm] fun TickingScheduler<Unit>.tick() Advances all tasks registered on this scheduler until they finish or suspend. |