Skip to content

Commit

Permalink
fix(legacy): Attempt at fixing concurrent exceptions. (CCBlueX#4133)
Browse files Browse the repository at this point in the history
  • Loading branch information
mems01 authored Oct 11, 2024
1 parent f585c70 commit f88eae8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/net/ccbluex/liquidbounce/utils/ClassUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ object ClassUtils {
): MutableSet<Value<*>> {
if (element == null) return orderedValues

var list = orderedValues
var list = mutableSetOf<Value<*>>()

if (element::class.java in configurables) {
/**
Expand All @@ -54,7 +54,7 @@ object ClassUtils {
if (fieldValue is Value<*>) {
list += fieldValue
} else {
list = findValues(fieldValue, configurables, orderedValues)
list = findValues(fieldValue, configurables, list)
}
}
} else if (element is Value<*>) {
Expand All @@ -67,12 +67,13 @@ object ClassUtils {
*/
if (element is Collection<*>) {
element.forEach {
list = findValues(it, configurables, orderedValues)
list = findValues(it, configurables, list)
}
}
}

return list
orderedValues.addAll(list)
return orderedValues
}

fun hasForge() = hasClass("net.minecraftforge.common.MinecraftForge")
Expand Down

0 comments on commit f88eae8

Please sign in to comment.