Class DebugEnvironment

java.lang.Object
gay.object.hexdebug.core.api.debugging.DebugEnvironment
Direct Known Subclasses:
SimplePlayerBasedDebugEnv

public abstract class DebugEnvironment extends Object
Like CastingEnvironment, but for debugging.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DebugEnvironment(@NotNull net.minecraft.server.level.ServerPlayer caster)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.minecraft.server.level.ServerPlayer
     
    @Nullable DebugStepType
     
    @Nullable at.petrak.hexcasting.api.casting.castables.Action
     
    @NotNull UUID
     
    abstract boolean
    For in-world debugees, returns whether the caster is close enough to the debuggee to allow debug-related actions to be performed (eg.
    abstract void
    Attempts to pause the debuggee.
    void
    printDebugMessage(@NotNull net.minecraft.network.chat.Component message)
     
    void
    printDebugMessage(@NotNull net.minecraft.network.chat.Component message, @NotNull DebugOutputCategory category)
     
    void
    printDebugMessage(@NotNull net.minecraft.network.chat.Component message, @NotNull DebugOutputCategory category, boolean withSource)
     
    void
    printDebugMishap(@NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect.DoMishap sideEffect)
     
    abstract void
    restart(int threadId)
    Attempts to restart the debuggee on the given debug thread.
    abstract boolean
    resume(@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.
    void
    setLastDebugStepType(@Nullable DebugStepType lastDebugStepType)
     
    void
    setLastEvaluatedAction(@Nullable at.petrak.hexcasting.api.casting.castables.Action lastEvaluatedAction)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DebugEnvironment

      protected DebugEnvironment(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster)
  • Method Details

    • pause

      public abstract void pause()
      Attempts to pause the debuggee. This is called by the debugger when requested by the user.
    • 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 void 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 use HexDebugCoreAPI.createDebugThread(gay.object.hexdebug.core.api.debugging.DebugEnvironment, java.lang.Integer) and HexDebugCoreAPI.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>).
    • 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

      @NotNull public @NotNull UUID getSessionId()
    • getLastDebugStepType

      @Internal @Nullable public @Nullable DebugStepType getLastDebugStepType()
    • setLastDebugStepType

      @Internal public void setLastDebugStepType(@Nullable @Nullable DebugStepType lastDebugStepType)
    • 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)