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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerQuests.Progress> static final PlayerQuests.Progress -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclaimed()Returns the value of theclaimedrecord component.booleandone()Returns the value of thedonerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisOpen()Whether the player can work on it: open, or done.Returns the value of theobjectivesrecord component.final StringtoString()Returns a string representation of this record class.booleanunlocked()Returns the value of theunlockedrecord component.
-
Field Details
-
NONE
-
CODEC
-
-
Constructor Details
-
Progress
Creates an instance of aProgressrecord class.- Parameters:
objectives- the value for theobjectivesrecord componentunlocked- the value for theunlockedrecord componentdone- the value for thedonerecord componentclaimed- the value for theclaimedrecord component
-
-
Method Details
-
isOpen
public boolean isOpen()Whether the player can work on it: open, or done. -
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
objectives
-
unlocked
public boolean unlocked()Returns the value of theunlockedrecord component.- Returns:
- the value of the
unlockedrecord component
-
done
public boolean done()Returns the value of thedonerecord component.- Returns:
- the value of the
donerecord component
-
claimed
public boolean claimed()Returns the value of theclaimedrecord component.- Returns:
- the value of the
claimedrecord component
-