Skip to content

Commit 93b1c40

Browse files
queueExecuteAndWrapIotas: allow specifying continuation
Adds a defaulted queueExecuteAndWrapIotas() parameter to allow specifying the continuation (in addition to the generated FrameEvaluate frame). This should not change current behavior, and, due to @jvmoverloads, does not break compatibility with existing addons.
1 parent 22b7a6f commit 93b1c40

File tree

1 file changed

+3
-2
lines changed
  • Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm

1 file changed

+3
-2
lines changed

Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) {
3838
*
3939
* Mutates this
4040
*/
41-
fun queueExecuteAndWrapIotas(iotas: List<Iota>, world: ServerLevel): ExecutionClientView {
41+
@JvmOverloads
42+
fun queueExecuteAndWrapIotas(iotas: List<Iota>, world: ServerLevel, nextContinuation: SpellContinuation = SpellContinuation.Done): ExecutionClientView {
4243
// Initialize the continuation stack to a single top-level eval for all iotas.
43-
var continuation = SpellContinuation.Done.pushFrame(FrameEvaluate(SpellList.LList(0, iotas), false))
44+
var continuation = nextContinuation.pushFrame(FrameEvaluate(SpellList.LList(0, iotas), false))
4445
// Begin aggregating info
4546
val info = TempControllerInfo(earlyExit = false)
4647
var lastResolutionType = ResolvedPatternType.UNRESOLVED

0 commit comments

Comments
 (0)