We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bestItemMatch
1 parent 1099c72 commit 2dffccdCopy full SHA for 2dffccd
src/main/kotlin/com/lambda/interaction/material/StackSelection.kt
@@ -57,7 +57,8 @@ class StackSelection {
57
/**
58
* Filters the given [stacks], sorts them with the [comparator] and returns the first value
59
*/
60
- fun bestItemMatch(stacks: List<ItemStack>): ItemStack? = stacks.minWithOrNull(comparator)
+ fun bestItemMatch(stacks: List<ItemStack>): ItemStack? =
61
+ filterStacks(stacks).firstOrNull()
62
63
fun matches(stack: ItemStack): Boolean = filterStack(stack)
64
0 commit comments