Skip to content

Commit 22938c1

Browse files
committed
Fix ICircleComponent ClassNotFoundException on Forge
1 parent dfa8de1 commit 22938c1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Common/src/main/java/gay/object/hexdebug/mixin/MixinBlockSlate.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package gay.object.hexdebug.mixin;
22

33
import at.petrak.hexcasting.api.block.circle.BlockCircleComponent;
4+
import at.petrak.hexcasting.api.casting.circles.ICircleComponent;
45
import at.petrak.hexcasting.api.casting.eval.ExecutionClientView;
56
import at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv;
67
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage;

Common/src/main/java/gay/object/hexdebug/mixin/MixinCircleExecutionState.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import at.petrak.hexcasting.api.casting.circles.BlockEntityAbstractImpetus;
44
import at.petrak.hexcasting.api.casting.circles.CircleExecutionState;
5+
import at.petrak.hexcasting.api.casting.circles.ICircleComponent;
56
import at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv;
67
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage;
78
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
@@ -70,14 +71,17 @@ public abstract class MixinCircleExecutionState implements IMixinCircleExecution
7071
if (world == null) return;
7172

7273
var bs = world.getBlockState(currentPos);
73-
if (!(bs.getBlock() instanceof DebuggableCircleComponent debuggable)) return;
74+
if (
75+
!(bs.getBlock() instanceof ICircleComponent component)
76+
|| !(bs.getBlock() instanceof DebuggableCircleComponent debuggable)
77+
) return;
7478

7579
var caster = getCaster(world);
7680
if (caster == null) return;
7781

7882
// we'll be executing this many times, so only energize etc the first time
79-
if (!debuggable.isEnergized(currentPos, bs, world)) {
80-
bs = debuggable.startEnergized(currentPos, bs, world);
83+
if (!component.isEnergized(currentPos, bs, world)) {
84+
bs = component.startEnergized(currentPos, bs, world);
8185
reachedPositions.add(currentPos);
8286

8387
debugEnv$hexdebug.setPaused(true);

Core/src/main/java/gay/object/hexdebug/core/api/debugging/DebuggableCircleComponent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package gay.object.hexdebug.core.api.debugging;
22

3-
import at.petrak.hexcasting.api.casting.circles.ICircleComponent;
43
import at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv;
54
import at.petrak.hexcasting.api.casting.eval.vm.CastingImage;
65
import net.minecraft.core.BlockPos;
76
import net.minecraft.core.Direction;
87
import net.minecraft.server.level.ServerPlayer;
98
import net.minecraft.world.level.block.state.BlockState;
109

11-
public interface DebuggableCircleComponent extends ICircleComponent {
10+
public interface DebuggableCircleComponent {
1211
void acceptDebugControlFlow(
1312
ServerPlayer caster,
1413
BaseCircleDebugEnv debugEnv,

0 commit comments

Comments
 (0)