diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt index 23e333b9..a88f2594 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt @@ -23,11 +23,13 @@ class OpMakePackagedSpell(val itemType: T, val cost: Int) : ctx: CastingContext ): Triple> { val entity = args.getChecked(0) - val patterns = args.getChecked>>(1).map { + val patternsRaw = args.getChecked>>(1) + + val patterns = patternsRaw.map { if (it.payload is HexPattern) it.payload else - throw MishapInvalidIota(it, 0, TranslatableComponent("hexcasting.mishap.invalid_value.list.pattern")) + throw MishapInvalidIota(SpellDatum.make(patternsRaw), 0, TranslatableComponent("hexcasting.mishap.invalid_value.list.pattern")) } val (handStack, hand) = ctx.getHeldItemToOperateOn { it.`is`(itemType) }