Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 18e1640

Browse files
1.0.8
1 parent bf5d3c4 commit 18e1640

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
ext.kotlin_version = "1.5.21"
99

10-
version = "1.0.7"
10+
version = "1.0.8"
1111
group = "mynameisjeff"
1212
archivesBaseName = "SkyblockClient-Updater"
1313

src/main/kotlin/mynameisjeff/skyblockclientupdater/SkyClientUpdater.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import net.minecraftforge.fml.common.gameevent.TickEvent
1313
@Mod(modid = "skyblockclientupdater", name = "SkyClient Updater", version = SkyClientUpdater.VERSION, clientSideOnly = true, modLanguage = "kotlin", modLanguageAdapter = "mynameisjeff.skyblockclientupdater.utils.kotlin.KotlinAdapter")
1414
object SkyClientUpdater {
1515

16-
const val VERSION = "1.0.7"
16+
const val VERSION = "1.0.8"
1717

18-
@JvmField
19-
val mc = Minecraft.getMinecraft()
18+
val mc: Minecraft
19+
get() = Minecraft.getMinecraft()
2020

2121
var displayScreen: GuiScreen? = null
2222

src/main/kotlin/mynameisjeff/skyblockclientupdater/utils/UpdateChecker.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ object UpdateChecker {
143143
loopMods@ for (modFile in needsChecking) {
144144
val fileName = modFile.name
145145
for (modEntry in allowedRemoteChecks) {
146-
if (!checkMatch(modEntry, fileName))
146+
if (!checkMatch(modEntry, fileName)) continue
147147
needsUpdate.add(Triple(modFile, modEntry, latestMods[modEntry]!!))
148148
continue@loopMods
149149
}
@@ -159,8 +159,8 @@ object UpdateChecker {
159159
val distance = StringUtils.getLevenshteinDistance(expected, received)
160160
if (distance !in 1..6) return false
161161

162-
val ec = e.filterIndexed { index, c -> c != r[index] }
163-
val rc = r.filterIndexed { index, c -> c != e[index] }
162+
val ec = e.filterIndexed { index, c -> c != r.getOrNull(index) }
163+
val rc = r.filterIndexed { index, c -> c != e.getOrNull(index) }
164164

165165
if (listOf(ec, rc).flatten().none { !it.isDigit() && !whitespace.contains(it) }) {
166166
return (ec.firstOrNull { it.isDigit() }?.digitToInt() ?: 0) > (rc.firstOrNull { it.isDigit() }?.digitToInt() ?: 0)

0 commit comments

Comments
 (0)