fix selection of items for placing being weird

This commit is contained in:
yrsegal@gmail.com 2022-08-27 09:11:19 -04:00
parent 32fed35beb
commit 25fea447a5

View file

@ -156,7 +156,7 @@ data class CastingContext(
val stacksToExamine = DiscoveryHandlers.collectItemSlots(this)
fun matches(stack: ItemStack): Boolean =
!stack.isEmpty && ItemStack.matches(item, stack)
!stack.isEmpty && ItemStack.isSameItemSameTags(item, stack)
val presentCount = stacksToExamine.fold(0) { acc, stack ->
acc + if (matches(stack)) stack.count else 0