diff options
author | nea <nea@nea.moe> | 2023-09-25 19:24:16 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-09-25 19:24:46 +0200 |
commit | 139089d9beb134465737c4afff3b1303bf481aa1 (patch) | |
tree | ca2582bee8d9988afe9ca4f6ed70b043d47aaf3a /src/main/kotlin/moe/nea/firmament/repo | |
parent | 2bd3ed1e238d75c4a185656ac6fd857ac6897a99 (diff) | |
download | Firmament-139089d9beb134465737c4afff3b1303bf481aa1.tar.gz Firmament-139089d9beb134465737c4afff3b1303bf481aa1.tar.bz2 Firmament-139089d9beb134465737c4afff3b1303bf481aa1.zip |
Port to 1.20.2
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/repo')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt b/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt index eda6130..6c877ec 100644 --- a/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt +++ b/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt @@ -13,7 +13,11 @@ import io.github.moulberry.repo.NEURepositoryException import io.github.moulberry.repo.data.NEUItem import io.github.moulberry.repo.data.NEURecipe import io.github.moulberry.repo.data.Rarity +import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents import kotlinx.coroutines.launch +import net.minecraft.client.MinecraftClient +import net.minecraft.network.packet.s2c.play.SynchronizeRecipesS2CPacket +import net.minecraft.text.Text import moe.nea.firmament.Firmament import moe.nea.firmament.Firmament.logger import moe.nea.firmament.gui.config.ManagedConfig @@ -21,10 +25,6 @@ import moe.nea.firmament.hud.ProgressBar import moe.nea.firmament.rei.PetData import moe.nea.firmament.util.MinecraftDispatcher import moe.nea.firmament.util.SkyblockId -import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents -import net.minecraft.client.MinecraftClient -import net.minecraft.network.packet.s2c.play.SynchronizeRecipesS2CPacket -import net.minecraft.text.Text object RepoManager { object Config : ManagedConfig("repo") { @@ -54,8 +54,10 @@ object RepoManager { var recentlyFailedToUpdateItemList = false - val progressBar = ProgressBar("", null, 0).also { - it.setSize(180, 22) + val progressBar by lazy { + ProgressBar("", null, 0).also { + it.setSize(180, 22) + } } val neuRepo: NEURepository = NEURepository.of(RepoDownloadManager.repoSavedLocation).apply { |