Class SimplePlayerBasedDebugEnv
java.lang.Object
gay.object.hexdebug.core.api.debugging.env.DebugEnvironment
gay.object.hexdebug.core.api.debugging.env.SimplePlayerBasedDebugEnv
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePlayerBasedDebugEnv(@NotNull net.minecraft.server.level.ServerPlayer caster, @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull List<at.petrak.hexcasting.api.casting.iota.Iota> iotas, @NotNull net.minecraft.network.chat.Component name) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.network.chat.ComponentgetName()Returns a display name for this debug session.booleanFor in-world debugees, returns whether the caster is close enough to the debuggee to allow debug-related actions to be performed (eg.voidrestart(int threadId) Attempts to restart the debuggee on the given debug thread.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.voidvoidTerminates the debuggee.Methods inherited from class gay.object.hexdebug.core.api.debugging.env.DebugEnvironment
getCaster, getLastDebugStepType, getLastEvaluatedAction, getSessionId, isDebugging, printDebugMessage, printDebugMessage, printDebugMessage, printDebugMishap, setLastDebugStepType, setLastEvaluatedAction
-
Constructor Details
-
SimplePlayerBasedDebugEnv
public SimplePlayerBasedDebugEnv(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster, @NotNull @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull @NotNull List<at.petrak.hexcasting.api.casting.iota.Iota> iotas, @NotNull @NotNull net.minecraft.network.chat.Component name)
-
-
Method Details
-
resume
public 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) Description copied from class:DebugEnvironmentAttempts to resume execution of the debuggee. This is called by the debugger after the current continuation is successfully evaluated to completion.- Specified by:
resumein classDebugEnvironment- Returns:
- true if the debug session can continue, or false if the debuggee should be terminated
-
restart
public void restart(int threadId) Description copied from class:DebugEnvironmentAttempts 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.env.DebugEnvironment, java.lang.Integer)andHexDebugCoreAPI.startDebuggingIotas(gay.object.hexdebug.core.api.debugging.env.DebugEnvironment, at.petrak.hexcasting.api.casting.eval.CastingEnvironment, java.util.List<at.petrak.hexcasting.api.casting.iota.Iota>, at.petrak.hexcasting.api.casting.eval.vm.CastingImage). However, note thatDebugEnvironmentis not called before this method, so it's up to the implementation whether they need to call that or not.- Specified by:
restartin classDebugEnvironment
-
terminate
public void terminate()Description copied from class:DebugEnvironmentTerminates the debuggee. This is called by the debugger afterDebugEnvironment.resume(at.petrak.hexcasting.api.casting.eval.CastingEnvironment, at.petrak.hexcasting.api.casting.eval.vm.CastingImage, at.petrak.hexcasting.api.casting.eval.ResolvedPatternType)returnsfalse, duringHexDebugCoreAPI.terminateDebugThread(gay.object.hexdebug.core.api.debugging.env.DebugEnvironment), or when requested by the user.- Specified by:
terminatein classDebugEnvironment
-
isCasterInRange
public boolean isCasterInRange()Description copied from class:DebugEnvironmentFor 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).- Specified by:
isCasterInRangein classDebugEnvironment
-
getName
@NotNull public @NotNull net.minecraft.network.chat.Component getName()Description copied from class:DebugEnvironmentReturns a display name for this debug session.
For example, debugger items return the name of the item, and spell circles return the name of the impetus.- Specified by:
getNamein classDebugEnvironment
-
start
public void start(@Nullable @Nullable Integer threadId) throws IllegalDebugSessionException, IllegalDebugThreadException
-