kettle

Kotlin utilities for Quilt mod development


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

//kettle/coffee.cypher.kettle.scheduler/TaskContext/waitUntil

waitUntil

[jvm]
suspend fun waitUntil(checkEvery: Int = 1, checkNow: Boolean = true, check: () -> Boolean)

Suspends the task until the check condition is fulfilled.

The condition will be checked once per checkEvery ticks (default every tick). If checkNow is true (or by default), the condition will be checked immediately, and if true the task will either yield or resume.