Record Class SwapTracker.LastImmersive<I extends ImmersiveInfo>

java.lang.Object
java.lang.Record
com.hammy275.immersivemc.client.immersive.SwapTracker.LastImmersive<I>
Enclosing class:
SwapTracker

protected static record SwapTracker.LastImmersive<I extends ImmersiveInfo>(Immersive<I extends ImmersiveInfo,?> immersive, I extends ImmersiveInfo info) extends Record
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LastImmersive(Immersive<I,?> immersive, I info)
    Creates an instance of a LastImmersive record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    doHitboxInteract(List<Integer> slots, net.minecraft.world.InteractionHand hand, int currentCooldown, boolean leftClickDown)
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the immersive record component.
    Returns the value of the info record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • LastImmersive

      protected LastImmersive(Immersive<I,?> immersive, I info)
      Creates an instance of a LastImmersive record class.
      Parameters:
      immersive - the value for the immersive record component
      info - the value for the info record component
  • Method Details

    • doHitboxInteract

      public int doHitboxInteract(List<Integer> slots, net.minecraft.world.InteractionHand hand, int currentCooldown, boolean leftClickDown)
    • equals

      public boolean equals(Object obj)
      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:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • 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
    • immersive

      public Immersive<I,?> immersive()
      Returns the value of the immersive record component.
      Returns:
      the value of the immersive record component
    • info

      public I info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component