From 3f2c5f49809065a512333d9031f3ecbad878ccc0 Mon Sep 17 00:00:00 2001 From: Walker Fowlkes Date: Sun, 28 Jul 2024 13:10:58 -0700 Subject: [PATCH] crash slain (closes #661) --- .../hexcasting/api/casting/circles/CircleExecutionState.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 7918d90812..f95fa84f01 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -237,6 +237,9 @@ public boolean tick(BlockEntityAbstractImpetus impetus) { var ctrl = executor.acceptControlFlow(this.currentImage, env, this.enteredFrom, this.currentPos, executorBlockState, world); + if (env.getImpetus() == null) + return false; //the impetus got removed during the cast and no longer exists in the world. stop casting + if (ctrl instanceof ICircleComponent.ControlFlow.Stop) { // acceptControlFlow should have already posted the error halt = true;