Interface HexDebugCoreAPI


public interface HexDebugCoreAPI
Main API service for hexdebug-core. Access via INSTANCE.
Unless otherwise stated, all API methods must be called only from the main server thread.
  • Field Details

  • Method Details

    • getDebugEnv

      @Contract(pure=true) @Nullable default @Nullable DebugEnvironment getDebugEnv(@NotNull @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env)
    • getDebugEnv

      @Contract(pure=true) @Nullable default @Nullable DebugEnvironment getDebugEnv(@NotNull @NotNull UUID casterId, @NotNull @NotNull UUID sessionId)
    • getDebugEnv

      @Contract(pure=true) @Nullable default @Nullable DebugEnvironment getDebugEnv(@NotNull @NotNull UUID casterId, int threadId)
    • getFreeDebugThreadId

      @Contract(pure=true) @Nullable default @Nullable Integer getFreeDebugThreadId(@NotNull @NotNull UUID casterId)
      Returns an arbitrary debug thread ID that is not currently in use by the given player, or null if no threads are currently available.
    • createDebugThread

      default void createDebugThread(@NotNull @NotNull DebugEnvironment debugEnv, @Nullable @Nullable Integer threadId) throws IllegalDebugSessionException, IllegalDebugThreadException
      Throws:
      IllegalDebugSessionException - if debugEnv is currently associated with an active debug session
      IllegalDebugThreadException - if threadId is out of range for the player associated with debugEnv, or currently associated with an active debug session
    • startDebuggingIotas

      default void startDebuggingIotas(@NotNull @NotNull DebugEnvironment debugEnv, @NotNull @NotNull at.petrak.hexcasting.api.casting.eval.CastingEnvironment env, @NotNull @NotNull List<at.petrak.hexcasting.api.casting.iota.Iota> iotas, @Nullable @Nullable at.petrak.hexcasting.api.casting.eval.vm.CastingImage image) throws IllegalDebugSessionException
      Throws:
      IllegalDebugSessionException - if no debug thread is currently associated with debugEnv, or if the debugger is already executing something
    • removeDebugThread

      default void removeDebugThread(@NotNull @NotNull DebugEnvironment debugEnv)
      Removes a debug thread without terminating it.
    • terminateDebugThread

      default void terminateDebugThread(@NotNull @NotNull DebugEnvironment debugEnv)
      Terminates and removes a debug thread.
    • printDebugMessage

      default void printDebugMessage(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster, @NotNull @NotNull UUID sessionId, @NotNull @NotNull net.minecraft.network.chat.Component message, @NotNull @NotNull OutputCategory category, boolean withSource)
    • getDebugEnv

      @Contract(pure=true) @Nullable default @Nullable DebugEnvironment getDebugEnv(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster, @NotNull @NotNull UUID sessionId)
    • getDebugEnv

      @Contract(pure=true) @Nullable default @Nullable DebugEnvironment getDebugEnv(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster, int threadId)
    • getFreeDebugThreadId

      @Contract(pure=true) @Nullable default @Nullable Integer getFreeDebugThreadId(@NotNull @NotNull net.minecraft.server.level.ServerPlayer caster)
      Returns an arbitrary debug thread ID that is not currently in use by the given player, or null if no threads are available.
    • isSessionDebugging

      @Contract(pure=true) default boolean isSessionDebugging(@NotNull @NotNull DebugEnvironment debugEnv)