MatterLink actually works now, no promises though
This commit is contained in:
parent
846ebecc44
commit
83d7028280
|
@ -6,7 +6,8 @@ data class CurseFile(
|
||||||
val downloadURL: String,
|
val downloadURL: String,
|
||||||
val fileName: String,
|
val fileName: String,
|
||||||
val gameVersion: List<String>,
|
val gameVersion: List<String>,
|
||||||
val releaseType: String
|
val releaseType: String,
|
||||||
|
val fileStatus: String
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
|
|
|
@ -44,7 +44,7 @@ class UpdateChecker : Runnable {
|
||||||
|
|
||||||
gson.fromJson(content, Array<CurseFile>::class.java)
|
gson.fromJson(content, Array<CurseFile>::class.java)
|
||||||
.filter {
|
.filter {
|
||||||
it.gameVersion.contains(instance.mcVersion)
|
it.fileStatus == "semiNormal" && it.gameVersion.contains(instance.mcVersion)
|
||||||
}
|
}
|
||||||
.sortedByDescending { it.fileName.substringAfterLast(" ") }
|
.sortedByDescending { it.fileName.substringAfterLast(" ") }
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ class UpdateChecker : Runnable {
|
||||||
if (!bigger) {
|
if (!bigger) {
|
||||||
val currentChunk = modVersionChunks.getOrNull(index) ?: 0
|
val currentChunk = modVersionChunks.getOrNull(index) ?: 0
|
||||||
instance.debug("$chunk > $currentChunk")
|
instance.debug("$chunk > $currentChunk")
|
||||||
if(chunk < currentChunk)
|
if (chunk < currentChunk)
|
||||||
return@forEach
|
return@forEach
|
||||||
|
|
||||||
bigger = chunk > currentChunk
|
bigger = chunk > currentChunk
|
||||||
|
|
Loading…
Reference in New Issue