Class ListIota

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

public class ListIota extends Iota
This is a wrapper for SpellList.
  • Field Details

  • Constructor Details

    • ListIota

      public ListIota(@NotNull @NotNull at.petrak.hexcasting.api.casting.SpellList list)
    • ListIota

      public ListIota(@NotNull @NotNull List<Iota> list)
  • Method Details

    • getList

      public at.petrak.hexcasting.api.casting.SpellList getList()
    • 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
    • subIotas

      @Nullable public @Nullable Iterable<Iota> subIotas()
      Description copied from class: Iota
      This method is called to determine whether the iota is above the max serialisation depth/serialisation count limits. It should return every "iota" that is a subelement of this iota. For example, if you implemented a Map<Iota, Iota>, then it should be an iterable over the keys *and* values of the map. If you implemented a typed List<Double> iota for some reason, you should instead override Iota.size().
      Overrides:
      subIotas 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
    • depth

      public int depth()
      Overrides:
      depth in class Iota