diff options
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 { |