Port to 1.20.2

This commit is contained in:
nea
2023-09-25 19:24:16 +02:00
parent 2bd3ed1e23
commit 139089d9be
13 changed files with 124 additions and 77 deletions

View File

@@ -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 {