Class ContinuationIota
java.lang.Object
at.petrak.hexcasting.api.casting.iota.Iota
at.petrak.hexcasting.api.casting.iota.ContinuationIota
An iota storing a continuation (in essence an execution state).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.chat.Componentstatic IotaType<ContinuationIota> -
Constructor Summary
ConstructorsConstructorDescriptionContinuationIota(at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation cont) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this iota is possible to execute (i.e.@NotNull at.petrak.hexcasting.api.casting.eval.CastResultexecute(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.SpellContinuationbooleanisTruthy()@NotNull net.minecraft.nbt.TagSerialize this under thedatatag.intsize()This method is called to determine whether the iota is above the max serialisation depth/serialisation count limits.booleantoleratesOther(Iota that) Compare this to another object, within a tolerance.
-
Field Details
-
DISPLAY
public static final net.minecraft.network.chat.Component DISPLAY -
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() -
toleratesOther
Description copied from class:IotaCompare this to another object, within a tolerance.- Specified by:
toleratesOtherin classIota
-
serialize
@NotNull public @NotNull net.minecraft.nbt.Tag serialize()Description copied from class:IotaSerialize this under thedatatag.You probably don't want to call this directly; use
IotaType.serialize(at.petrak.hexcasting.api.casting.iota.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:IotaThis method is called when this iota is executed (i.e. Hermes is run on a list containing it, unescaped). By default it will return aCastResultindicating an error has occurred. -
executable
public boolean executable()Description copied from class:IotaReturns whether this iota is possible to execute (i.e. whetherIota.execute(at.petrak.hexcasting.api.casting.eval.vm.CastingVM, net.minecraft.server.level.ServerLevel, at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation)has been overridden.- Overrides:
executablein classIota
-
size
public int size()Description copied from class:IotaThis 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 asContinuationIota, 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.
-