diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt | 6 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt index 4d825b2e9..36dc3c6f0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule +import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.LorenzUtils -import net.minecraft.client.Minecraft import kotlin.concurrent.fixedRateTimer @SkyHanniModule @@ -12,8 +12,8 @@ object FixedRateTimerManager { init { fixedRateTimer(name = "skyhanni-fixed-rate-timer-manager", period = 1000L) { - Minecraft.getMinecraft().addScheduledTask { - if (!LorenzUtils.onHypixel) return@addScheduledTask + DelayedRun.onThread.execute { + if (!LorenzUtils.onHypixel) return@execute SecondPassedEvent(totalSeconds).postAndCatch() totalSeconds++ } diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index 79d329f22..551f44699 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -7,12 +7,12 @@ import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.chat.Text import at.hannibal2.skyhanni.utils.chat.Text.asComponent import at.hannibal2.skyhanni.utils.chat.Text.send import com.google.gson.JsonObject -import net.minecraft.client.Minecraft import net.minecraft.util.IChatComponent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.apache.commons.io.FileUtils @@ -169,7 +169,7 @@ class RepoManager(private val configLocation: File) { val comp = CompletableFuture<Void?>() if (!atomicShouldManuallyReload.get()) return comp ErrorManager.resetCache() - Minecraft.getMinecraft().addScheduledTask { + DelayedRun.onThread.execute { error = false successfulConstants.clear() unsuccessfulConstants.clear() |
