aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 02:25:22 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 02:25:22 +0200
commit7b6aac3ea8b7aebaef104097b0ac7767b27f4c80 (patch)
tree7b9e068b912256f1bfccbc717517d17aa62542b8 /src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt
parent2ac1f3d037fee016063cd7bc499d4abcfeb765d5 (diff)
downloadskyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.tar.gz
skyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.tar.bz2
skyhanni-7b6aac3ea8b7aebaef104097b0ac7767b27f4c80.zip
code cleanup utils
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt
index 2ccbf30de..8771de215 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/MinecraftDispatcher.kt
@@ -11,6 +11,7 @@ object MinecraftDispatcher : MainCoroutineDispatcher() {
override fun isDispatchNeeded(context: CoroutineContext): Boolean {
return !Minecraft.getMinecraft().isCallingFromMinecraftThread
}
+
override fun dispatch(context: CoroutineContext, block: Runnable) {
Minecraft.getMinecraft().addScheduledTask(block)
}