Record Class PlayerQuests
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.quest.PlayerQuests
- Record Components:
quests- each server quest's progress, by idobtained- the items the player has had that some quest's "obtained" asks for, by id, whatever became of themread- the entries the server counted the player reading, by bookflags- the player's own flags, set by commands and mods
public record PlayerQuests(Map<net.minecraft.resources.Identifier, PlayerQuests.Progress> quests, List<net.minecraft.resources.Identifier> obtained, Map<net.minecraft.resources.Identifier, List<String>> read, List<String> flags)
extends Record
What the server knows of a player's quests: kept with the player, sent only to them. Immutable: a change is a new
record, and one equal to the last isn't sent again.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne 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> static final PlayerQuests -
Constructor Summary
ConstructorsConstructorDescriptionPlayerQuests(Map<net.minecraft.resources.Identifier, PlayerQuests.Progress> quests, List<net.minecraft.resources.Identifier> obtained, Map<net.minecraft.resources.Identifier, List<String>> read, List<String> flags) Creates an instance of aPlayerQuestsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.flags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.booleanList<net.minecraft.resources.Identifier> obtained()Returns the value of theobtainedrecord component.progress(net.minecraft.resources.Identifier quest) Map<net.minecraft.resources.Identifier, PlayerQuests.Progress> quests()Returns the value of thequestsrecord component.read()Returns the value of thereadrecord component.final StringtoString()Returns a string representation of this record class.with(net.minecraft.resources.Identifier quest, PlayerQuests.Progress progress) withObtained(Set<net.minecraft.resources.Identifier> items)
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
PlayerQuests
-
-
Method Details
-
progress
-
with
-
withObtained
-
isRead
-
withRead
-
withFlag
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
quests
-
obtained
-
read
-
flags
-