Class ContinuationIota

java.lang.Object
at.petrak.hexcasting.api.casting.iota.Iota
at.petrak.hexcasting.api.casting.iota.ContinuationIota

public class ContinuationIota extends Iota
An iota storing a continuation (in essence an execution state).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.network.chat.Component
     
     

    Fields inherited from class at.petrak.hexcasting.api.casting.iota.Iota

    payload, type
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContinuationIota(at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation cont)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether this iota is possible to execute (i.e.
    @NotNull at.petrak.hexcasting.api.casting.eval.CastResult
    execute(at.petrak.hexcasting.api.casting.eval.vm.CastingVM vm, net.minecraft.server.level.ServerLevel world, at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation continuation)
    This method is called when this iota is executed (i.e.
    at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation
     
    boolean
     
    @NotNull net.minecraft.nbt.Tag
    Serialize this under the data tag.
    int
    This method is called to determine whether the iota is above the max serialisation depth/serialisation count limits.
    boolean
    Compare this to another object, within a tolerance.

    Methods inherited from class at.petrak.hexcasting.api.casting.iota.Iota

    depth, display, getType, hashCode, subIotas, tolerates, typesMatch

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DISPLAY

      public static final net.minecraft.network.chat.Component DISPLAY
    • TYPE

      public static IotaType<ContinuationIota> TYPE
  • Constructor Details

    • ContinuationIota

      public ContinuationIota(at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation cont)
  • Method Details

    • getContinuation

      public at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation getContinuation()
    • isTruthy

      public boolean isTruthy()
      Specified by:
      isTruthy in class Iota
    • toleratesOther

      public boolean toleratesOther(Iota that)
      Description copied from class: Iota
      Compare this to another object, within a tolerance.
      Specified by:
      toleratesOther in class Iota
    • serialize

      @NotNull public @NotNull net.minecraft.nbt.Tag serialize()
      Description copied from class: Iota
      Serialize this under the data tag.

      You probably don't want to call this directly; use IotaType.serialize(at.petrak.hexcasting.api.casting.iota.Iota).

      Specified by:
      serialize in class Iota
    • execute

      @NotNull public @NotNull at.petrak.hexcasting.api.casting.eval.CastResult execute(at.petrak.hexcasting.api.casting.eval.vm.CastingVM vm, net.minecraft.server.level.ServerLevel world, at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation continuation)
      Description copied from class: Iota
      This method is called when this iota is executed (i.e. Hermes is run on a list containing it, unescaped). By default it will return a CastResult indicating an error has occurred.
      Overrides:
      execute in class Iota
    • executable

      public boolean executable()
      Description copied from class: Iota
      Overrides:
      executable in class Iota
    • size

      public int size()
      Description copied from class: Iota
      This method is called to determine whether the iota is above the max serialisation depth/serialisation count limits. This is an alternative to deriving subIotas for if your Iota is a datastructure of variable size over something that doesn't make sense to convert to an Iota iterable, such as ContinuationIota, or a typed List<Double>. It should return "1" per "iota sized" unit of memory that it would occupy. Easy option, return the element count of your data structure.
      Overrides:
      size in class Iota