MatterLink actually works now, no promises though

This commit is contained in:
NikkyAI 2018-02-19 20:31:02 +01:00
parent 846ebecc44
commit 83d7028280
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,8 @@ data class CurseFile(
val downloadURL: String,
val fileName: String,
val gameVersion: List<String>,
val releaseType: String
val releaseType: String,
val fileStatus: String
) {
companion object {
val gson = Gson()

View File

@ -44,7 +44,7 @@ class UpdateChecker : Runnable {
gson.fromJson(content, Array<CurseFile>::class.java)
.filter {
it.gameVersion.contains(instance.mcVersion)
it.fileStatus == "semiNormal" && it.gameVersion.contains(instance.mcVersion)
}
.sortedByDescending { it.fileName.substringAfterLast(" ") }
@ -70,7 +70,7 @@ class UpdateChecker : Runnable {
if (!bigger) {
val currentChunk = modVersionChunks.getOrNull(index) ?: 0
instance.debug("$chunk > $currentChunk")
if(chunk < currentChunk)
if (chunk < currentChunk)
return@forEach
bigger = chunk > currentChunk