Record Class GuideReveal.Use

java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideReveal.Use
Enclosing interface:
GuideReveal

public static record GuideReveal.Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread) extends Record
A reveal: an effect, how long it takes in seconds, whether it plays only the first time each spread is seen this game (once; pages of entries read in an earlier game count as seen), and whether it plays only on spreads the reader has never been shown in full (unread; kept with the player, or with the copy of a book that keeps its own, so it doesn't play again after a restart or on another computer).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final GuideReveal.Use
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Use(net.minecraft.resources.ResourceLocation effect, float seconds)
     
    Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once)
     
    Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread)
    Creates an instance of a Use record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
    Returns the value of the effect record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the once record component.
    float
    Returns the value of the seconds record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the unread record component.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • Use

      public Use(net.minecraft.resources.ResourceLocation effect, float seconds)
    • Use

      public Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once)
    • Use

      public Use(net.minecraft.resources.ResourceLocation effect, float seconds, boolean once, boolean unread)
      Creates an instance of a Use record class.
      Parameters:
      effect - the value for the effect record component
      seconds - the value for the seconds record component
      once - the value for the once record component
      unread - the value for the unread record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • effect

      public net.minecraft.resources.ResourceLocation effect()
      Returns the value of the effect record component.
      Returns:
      the value of the effect record component
    • seconds

      public float seconds()
      Returns the value of the seconds record component.
      Returns:
      the value of the seconds record component
    • once

      public boolean once()
      Returns the value of the once record component.
      Returns:
      the value of the once record component
    • unread

      public boolean unread()
      Returns the value of the unread record component.
      Returns:
      the value of the unread record component