Class DebugEnvironment
java.lang.Object
gay.object.hexdebug.core.api.debugging.DebugEnvironment
- Direct Known Subclasses:
SynchronousDebugEnv
Like
CastingEnvironment, but for debugging.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDebugEnvironment(@NotNull net.minecraft.server.level.ServerPlayer caster) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.server.level.ServerPlayer@Nullable DebugStepType@Nullable at.petrak.hexcasting.api.casting.castables.Action@NotNull UUIDabstract booleanFor in-world debugees, returns whether the caster is close enough to the debuggee to allow debug-related actions to be performed (eg.abstract booleanpause()Attempts to pause the debuggee.voidprintDebugMessage(@NotNull net.minecraft.network.chat.Component message) voidprintDebugMessage(@NotNull net.minecraft.network.chat.Component message, @NotNull DebugOutputCategory category) voidprintDebugMessage(@NotNull net.minecraft.network.chat.Component message, @NotNull DebugOutputCategory category, boolean withSource) voidprintDebugMishap(@NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect.DoMishap sideEffect) abstract booleanrestart(int threadId) Attempts to restart the debuggee on the given debug thread.abstract booleanresume(@NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull at.petrak.hexcasting.api.casting.eval.vm.CastingImage image, @NotNull at.petrak.hexcasting.api.casting.eval.ResolvedPatternType resolutionType) Attempts to resume execution of the debuggee.voidsetLastDebugStepType(@Nullable DebugStepType lastDebugStepType) voidsetLastEvaluatedAction(@Nullable at.petrak.hexcasting.api.casting.castables.Action lastEvaluatedAction)
-
Constructor Details
-
DebugEnvironment
protected DebugEnvironment(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster)
-
-
Method Details
-
pause
public abstract boolean pause()Attempts to pause the debuggee. This is called by the debugger when requested by the user.- Returns:
- whether the debuggee was successfully paused
-
resume
public abstract boolean resume(@NotNull @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull @NotNull at.petrak.hexcasting.api.casting.eval.vm.CastingImage image, @NotNull @NotNull at.petrak.hexcasting.api.casting.eval.ResolvedPatternType resolutionType) Attempts to resume execution of the debuggee. This is called by the debugger after the current continuation is successfully evaluated to completion.- Returns:
- true if the debug session can continue, or false if the debuggee has been terminated
-
restart
public abstract boolean restart(int threadId) Attempts to restart the debuggee on the given debug thread. This is called by the debugger when requested by the user.
The previous debug thread is removed before this method is called, so the implementation may useHexDebugCoreAPI.createDebugThread(gay.object.hexdebug.core.api.debugging.DebugEnvironment, java.lang.Integer)andHexDebugCoreAPI.startExecuting(gay.object.hexdebug.core.api.debugging.DebugEnvironment, at.petrak.hexcasting.api.casting.eval.CastingEnvironment, java.util.List<at.petrak.hexcasting.api.casting.iota.Iota>).- Returns:
- whether the debuggee was successfully restarted
-
isCasterInRange
public abstract boolean isCasterInRange()For in-world debugees, returns whether the caster is close enough to the debuggee to allow debug-related actions to be performed (eg. pause, step, restart). -
printDebugMessage
public void printDebugMessage(@NotNull @NotNull net.minecraft.network.chat.Component message) -
printDebugMessage
public void printDebugMessage(@NotNull @NotNull net.minecraft.network.chat.Component message, @NotNull @NotNull DebugOutputCategory category) -
printDebugMessage
public void printDebugMessage(@NotNull @NotNull net.minecraft.network.chat.Component message, @NotNull @NotNull DebugOutputCategory category, boolean withSource) -
printDebugMishap
public void printDebugMishap(@NotNull @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect.DoMishap sideEffect) -
getCaster
@NotNull public @NotNull net.minecraft.server.level.ServerPlayer getCaster() -
getSessionId
-
getLastDebugStepType
-
setLastDebugStepType
-
getLastEvaluatedAction
@Internal @Nullable public @Nullable at.petrak.hexcasting.api.casting.castables.Action getLastEvaluatedAction() -
setLastEvaluatedAction
@Internal public void setLastEvaluatedAction(@Nullable @Nullable at.petrak.hexcasting.api.casting.castables.Action lastEvaluatedAction)
-