Record Class PlayerQuests.Progress

java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.quest.PlayerQuests.Progress
Enclosing class:
PlayerQuests

public static record PlayerQuests.Progress(List<Float> objectives, boolean unlocked, boolean done, boolean claimed) extends Record
One quest's progress: each objective's, 0 to 1; whether it is open (its "requires" met once, and open from then on); whether it is done (and stays so, whatever happens after); and whether its reward has been claimed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<PlayerQuests.Progress>
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Progress(List<Float> objectives, boolean unlocked, boolean done, boolean claimed)
    Creates an instance of a Progress record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the claimed record component.
    boolean
    Returns the value of the done 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
    Whether the player can work on it: open, or done.
    Returns the value of the objectives record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the unlocked record component.

    Methods inherited from class Object

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

  • Constructor Details

    • Progress

      public Progress(List<Float> objectives, boolean unlocked, boolean done, boolean claimed)
      Creates an instance of a Progress record class.
      Parameters:
      objectives - the value for the objectives record component
      unlocked - the value for the unlocked record component
      done - the value for the done record component
      claimed - the value for the claimed record component
  • Method Details

    • isOpen

      public boolean isOpen()
      Whether the player can work on it: open, or done.
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • objectives

      public List<Float> objectives()
      Returns the value of the objectives record component.
      Returns:
      the value of the objectives record component
    • unlocked

      public boolean unlocked()
      Returns the value of the unlocked record component.
      Returns:
      the value of the unlocked record component
    • done

      public boolean done()
      Returns the value of the done record component.
      Returns:
      the value of the done record component
    • claimed

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