Skip to content

Commit 83f05dd

Browse files
committed
redownload mappings if theyre incorrect
1 parent 23c15b2 commit 83f05dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/kotlin/com/lambda/util/DynamicReflectionSerializer.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ object DynamicReflectionSerializer : Loadable {
8181

8282
private val qualifiedMappings = runBlocking {
8383
cache.resolveFile(LambdaAPI.gameVersion)
84+
.also {
85+
if (!it.readText().contains("net.minecraft.client.MinecraftClient")) {
86+
LOG.debug("Re-downloading yarn mappings as the current cache is improperly generated")
87+
it.delete()
88+
}
89+
}
8490
.downloadIfNotPresent("${LambdaAPI.mappings}/${LambdaAPI.gameVersion}")
8591
.map(::buildMappingsMap)
8692
.getOrElse {

0 commit comments

Comments
 (0)