Skip to content

Commit

Permalink
Fix some code being broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Sychic committed Nov 8, 2023
1 parent 11dbd74 commit ba356fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/gg/skytils/skytilsmod/core/DataFetcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import gg.skytils.skytilsmod.utils.*
import io.ktor.client.call.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand All @@ -48,8 +49,8 @@ import net.minecraft.util.BlockPos
import kotlin.concurrent.fixedRateTimer

object DataFetcher {
private fun loadData() {
Skytils.IO.launch {
private fun loadData(): Job {
return Skytils.IO.launch {
try {
client.get("${dataUrl}constants/domain.txt").bodyAsText().apply {
if (isNotBlank()) {
Expand Down Expand Up @@ -177,9 +178,8 @@ object DataFetcher {
}

@JvmStatic
fun reloadData() {
fun reloadData() =
loadData()
}

internal fun preload() {}

Expand Down

0 comments on commit ba356fa

Please sign in to comment.