Skip to content

Commit 2dffccd

Browse files
committed
Fixed bestItemMatch
1 parent 1099c72 commit 2dffccd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/com/lambda/interaction/material/StackSelection.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class StackSelection {
5757
/**
5858
* Filters the given [stacks], sorts them with the [comparator] and returns the first value
5959
*/
60-
fun bestItemMatch(stacks: List<ItemStack>): ItemStack? = stacks.minWithOrNull(comparator)
60+
fun bestItemMatch(stacks: List<ItemStack>): ItemStack? =
61+
filterStacks(stacks).firstOrNull()
6162

6263
fun matches(stack: ItemStack): Boolean = filterStack(stack)
6364

0 commit comments

Comments
 (0)