kettle

Kotlin utilities for Quilt mod development


Project maintained by Cypher121 Hosted on GitHub Pages — Theme by mattgraham

//kettle/coffee.cypher.kettle.scheduler/TickingScheduler

TickingScheduler

[jvm]
class TickingScheduler<T : Any>

A scheduler object capable of executing multiple Tasks and providing them with contexts of type T.

Constructors

   
TickingScheduler [jvm]
constructor()

Properties

Name Summary
tasks [jvm]
val tasks: List<Task<T>>
Tasks currently being managed by this scheduler.

Functions

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.