port of 02804df55c
This commit is contained in:
yrsegal@gmail.com 2022-07-24 20:03:45 -04:00
parent 150f646ddf
commit 64c143cfe9

View file

@ -39,10 +39,6 @@ data class CastingContext(
private val entitiesGivenMotion = mutableSetOf<Entity>()
inline fun getHeldItemToOperateOn(acceptItemIf: (ItemStack) -> Boolean): Pair<ItemStack, InteractionHand> {
if (this.spellCircle == null) {
return caster.getItemInHand(otherHand) to otherHand
}
val handItem = caster.getItemInHand(castingHand)
if (!acceptItemIf(handItem))
return caster.getItemInHand(otherHand) to otherHand