File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Common/src/main/java/at/petrak/hexcasting/api/casting/castables Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.casting.eval.OperationResult
55import at.petrak.hexcasting.api.casting.eval.vm.CastingImage
66import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation
77import at.petrak.hexcasting.api.casting.iota.Iota
8+ import at.petrak.hexcasting.api.casting.mishaps.Mishap
89import net.minecraft.world.phys.Vec3
910import java.text.DecimalFormat
1011
@@ -33,6 +34,7 @@ interface Action {
3334 * The userdata tag is copied for you, so you don't need to worry about mutation messing up things
3435 * behind the scenes.
3536 */
37+ @Throws(Mishap ::class )
3638 fun operate (
3739 env : CastingEnvironment ,
3840 image : CastingImage ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect
66import at.petrak.hexcasting.api.casting.eval.vm.CastingImage
77import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation
88import at.petrak.hexcasting.api.casting.iota.Iota
9+ import at.petrak.hexcasting.api.casting.mishaps.Mishap
910import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs
1011import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughMedia
1112import at.petrak.hexcasting.common.lib.hex.HexEvalSounds
@@ -18,8 +19,10 @@ interface ConstMediaAction : Action {
1819 val mediaCost: Long
1920 get() = 0
2021
22+ @Throws(Mishap ::class )
2123 fun execute (args : List <Iota >, env : CastingEnvironment ): List <Iota >
2224
25+ @Throws(Mishap ::class )
2326 fun executeWithOpCount (args : List <Iota >, env : CastingEnvironment ): CostMediaActionResult {
2427 val stack = this .execute(args, env)
2528 return CostMediaActionResult (stack)
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota
1111import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs
1212import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughMedia
1313import at.petrak.hexcasting.common.lib.hex.HexEvalSounds
14+ import at.petrak.hexcasting.api.casting.mishaps.Mishap
1415import net.minecraft.nbt.CompoundTag
1516
1617interface SpellAction : Action {
@@ -20,11 +21,14 @@ interface SpellAction : Action {
2021
2122 fun awardsCastingStat (ctx : CastingEnvironment ): Boolean = true
2223
24+ @Throws(Mishap ::class )
2325 fun execute (
2426 args : List <Iota >,
2527 env : CastingEnvironment
2628 ): Result
2729
30+ @Throws(Mishap ::class )
31+
2832 fun executeWithUserdata (
2933 args : List <Iota >, env : CastingEnvironment , userData : CompoundTag
3034 ): Result {
You can’t perform that action at this time.
0 commit comments