Skip to content

Commit

Permalink
Run tickTask tasks on MC game thread
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Dec 8, 2023
1 parent cc699b0 commit 7db6e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/core/tick.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ fun <T> tickTask(ticks: Int, repeats: Boolean = false, task: () -> T) =
flow {
do {
Events.await<TickEvent>(ticks)
emit(task())
emit(mcScope.launch { task() })
} while (repeats)
}.flowOn(Tick.dispatcher)

0 comments on commit 7db6e50

Please sign in to comment.