From 8ea5b53ee227243aad45a922566796f60c4f6a7e Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Mon, 22 Aug 2022 23:29:22 -0400 Subject: [PATCH] fix change to discovery not allowing for unstackables --- .../at/petrak/hexcasting/api/spell/casting/CastingContext.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingContext.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingContext.kt index 58c8003f..ce1739dc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingContext.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingContext.kt @@ -14,7 +14,6 @@ import net.minecraft.server.level.ServerLevel import net.minecraft.server.level.ServerPlayer import net.minecraft.world.InteractionHand import net.minecraft.world.entity.Entity -import net.minecraft.world.entity.item.ItemEntity import net.minecraft.world.entity.player.Player import net.minecraft.world.item.ItemStack import net.minecraft.world.level.GameType @@ -157,7 +156,7 @@ data class CastingContext( val stacksToExamine = DiscoveryHandlers.collectItemSlots(this) fun matches(stack: ItemStack): Boolean = - !stack.isEmpty && ItemEntity.areMergable(stack, item) + !stack.isEmpty && ItemStack.matches(item, stack) val presentCount = stacksToExamine.fold(0) { acc, stack -> acc + if (matches(stack)) stack.count else 0