File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
src/main/kotlin/com/lambda Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,7 @@ class StackSelection {
5858 /* *
5959 * Filters the given [stacks], sorts them with the [comparator] and returns the first value
6060 */
61- fun bestItemMatch (stacks : List <ItemStack >): ItemStack ? =
62- filterStacks(stacks).firstOrNull()
61+ fun bestItemMatch (stacks : List <ItemStack >): ItemStack ? = filterStacks(stacks).firstOrNull()
6362
6463 fun matches (stack : ItemStack ): Boolean = filterStack(stack)
6564
@@ -169,7 +168,7 @@ class StackSelection {
169168 else false
170169 }
171170
172- fun isSuitableForBreaking (blockState : BlockState ): (ItemStack ) -> Boolean = { it.isSuitableFor(blockState) }
171+ fun isSuitableForBreaking (blockState : BlockState ): (ItemStack ) -> Boolean = { ! blockState.isToolRequired || it.isSuitableFor(blockState) }
173172
174173 fun hasTag (tag : TagKey <Item >): (ItemStack ) -> Boolean = { it.isIn(tag) }
175174
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ object EnchantmentUtils {
4949 ?.intValue
5050 ? : 0
5151
52-
5352 /* *
5453 * Iterates over all the enchantments for the given [ItemStack]
5554 */
You can’t perform that action at this time.
0 commit comments