mcClientSyncLaunch
Does the same as launch, but the dispatcher defaults to mcClientCoroutineDispatcher.
This way, you can execute code synchronously (to the MinecraftServer main thread) very easily.
coroutineScope {
mcClientSyncLaunch {
// suspending and sync now
}
}
Content copied to clipboard