Skip to content

Commit

Permalink
just skip fields without descs, propogation adds the descs.
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Aug 28, 2024
1 parent 7ee81fb commit 5450355
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,8 @@ class MappingsProvider(project: Project, minecraft: MinecraftConfig, subKey: Str
): MethodVisitor? {
if (srcName in names && dstName in names) {
val fromMethodName = names[srcName]!!.first
val fromMethodDesc = names[srcName]!!.second
val fromMethodDesc = names[srcName]!!.second ?: return null
val toMethodName = names[dstName]!!.first
if (fromMethodDesc == null) {
project.logger.info("[Unimined/MappingProvider ${project.path}/${minecraft.sourceSet}] skipping ${fromClassName}.${fromMethodName} as desc is null")
return null
}
val method = memberOf(fromClassName, fromMethodName, fromMethodDesc.toString())
acceptor.acceptMethod(method, toMethodName)
}
Expand All @@ -769,8 +765,9 @@ class MappingsProvider(project: Project, minecraft: MinecraftConfig, subKey: Str
): FieldVisitor? {
if (srcName in names && dstName in names) {
val fromFieldName = names[srcName]!!.first
val fromFieldDesc = names[srcName]!!.second ?: return null
val toFieldName = names[dstName]!!.first
acceptor.acceptField(memberOf(fromClassName, fromFieldName, names[srcName]?.second?.toString()), toFieldName)
acceptor.acceptField(memberOf(fromClassName, fromFieldName, fromFieldDesc.toString()), toFieldName)
}
return null
}
Expand Down

0 comments on commit 5450355

Please sign in to comment.