Record Class CapItemHexHolder

java.lang.Object
java.lang.Record
at.petrak.hexcasting.forge.cap.adimpl.CapItemHexHolder
All Implemented Interfaces:
at.petrak.hexcasting.api.addldata.ADHexHolder

public record CapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack) extends Record implements at.petrak.hexcasting.api.addldata.ADHexHolder
  • Constructor Summary

    Constructors
    Constructor
    Description
    CapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack)
    Creates an instance of a CapItemHexHolder record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable List<at.petrak.hexcasting.api.casting.iota.Iota>
    getHex(net.minecraft.server.level.ServerLevel level)
     
    @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment
     
    final int
    Returns a hash code value for this object.
    boolean
     
    at.petrak.hexcasting.api.item.HexHolderItem
    Returns the value of the holder record component.
    net.minecraft.world.item.ItemStack
    Returns the value of the stack record component.
    final String
    Returns a string representation of this record class.
    void
    writeHex(List<at.petrak.hexcasting.api.casting.iota.Iota> patterns, @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment pigment, long media)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CapItemHexHolder

      public CapItemHexHolder(at.petrak.hexcasting.api.item.HexHolderItem holder, net.minecraft.world.item.ItemStack stack)
      Creates an instance of a CapItemHexHolder record class.
      Parameters:
      holder - the value for the holder record component
      stack - the value for the stack record component
  • Method Details

    • canDrawMediaFromInventory

      public boolean canDrawMediaFromInventory()
      Specified by:
      canDrawMediaFromInventory in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • hasHex

      public boolean hasHex()
      Specified by:
      hasHex in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • getHex

      @Nullable public @Nullable List<at.petrak.hexcasting.api.casting.iota.Iota> getHex(net.minecraft.server.level.ServerLevel level)
      Specified by:
      getHex in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • writeHex

      public void writeHex(List<at.petrak.hexcasting.api.casting.iota.Iota> patterns, @Nullable @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment pigment, long media)
      Specified by:
      writeHex in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • clearHex

      public void clearHex()
      Specified by:
      clearHex in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • getPigment

      @Nullable public @Nullable at.petrak.hexcasting.api.pigment.FrozenPigment getPigment()
      Specified by:
      getPigment in interface at.petrak.hexcasting.api.addldata.ADHexHolder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • holder

      public at.petrak.hexcasting.api.item.HexHolderItem holder()
      Returns the value of the holder record component.
      Returns:
      the value of the holder record component
    • stack

      public net.minecraft.world.item.ItemStack stack()
      Returns the value of the stack record component.
      Returns:
      the value of the stack record component