diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt index b7a8a9ab7..3b4574058 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt @@ -20,7 +20,7 @@ class OpCreateSentinel(val extendsRange: Boolean) : SpellAction { args: List, env: CastingEnvironment ): SpellAction.Result { - if (env.castingEntity == null) + if (env.castingEntity !is ServerPlayer) throw MishapBadCaster() val target = args.getVec3(0, argc) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt index 06e57a183..43785a2ad 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt @@ -17,7 +17,7 @@ object OpDestroySentinel : SpellAction { args: List, env: CastingEnvironment ): SpellAction.Result { - if (env.castingEntity == null) + if (env.castingEntity !is ServerPlayer) throw MishapBadCaster() val sentinel = IXplatAbstractions.INSTANCE.getSentinel(env.castingEntity as? ServerPlayer) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt index 447363c6c..fa56812ca 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt @@ -15,7 +15,7 @@ object OpGetSentinelPos : ConstMediaAction { override val argc = 0 override val mediaCost: Long = MediaConstants.DUST_UNIT / 10 override fun execute(args: List, env: CastingEnvironment): List { - if (env.castingEntity == null) + if (env.castingEntity !is ServerPlayer) throw MishapBadCaster() val sentinel = IXplatAbstractions.INSTANCE.getSentinel(env.castingEntity as? ServerPlayer) ?: return listOf(NullIota()) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt index 9d58ab44c..cad52447e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt @@ -18,7 +18,7 @@ object OpGetSentinelWayfind : ConstMediaAction { override val argc = 1 override val mediaCost: Long = MediaConstants.DUST_UNIT / 10 override fun execute(args: List, env: CastingEnvironment): List { - if (env.castingEntity == null) + if (env.castingEntity !is ServerPlayer) throw MishapBadCaster() val from = args.getVec3(0, argc)