Lorekeeper Player Data
Persistent per-player data for Lorekeeper interactions.
Tracks player encounters with the Lorekeeper NPC, interview progress, cooldowns, and various gameplay flags. Extends Minecraft's SavedData for automatic persistence.
Tracked Data
First encounter status
Interview question rotation index
Asked non-AI interview question keys
Encounter cooldowns
Action flags (one-time events)
Settlement chunk tracking
Combat status (transient)
Luck counter (transient)
See also
for interview logic
Types
Factory and persistence utilities for LorekeeperPlayerData.
Functions
Adds pending royalty emeralds for a player and returns the new total.
Adds to the player's reputation score.
Claims and removes the oldest pending investigation lead for a player.
Claims and clears pending royalties for a player.
Clears remembered non-AI interview questions for the player.
Returns normalized non-AI interview questions that were already asked to this player.
Returns known normalized aliases for a player, including canonical registered name tokens.
Returns queued investigation leads for a player.
Returns pending royalty emeralds for a player.
Returns the player's reputation score.
Checks if the player has a specific action flag set.
Checks if the player has previously encountered the Lorekeeper NPC.
Increments the player's luck counter by one.
Checks if the player is currently considered to be in combat.
Checks if the player is currently on encounter cooldown.
Marks a one-time action flag for the player. Returns true if newly set.
Marks a normalized non-AI interview question key as asked for the player.
Records the current time as the player's last combat time.
Marks the player as having encountered the Lorekeeper NPC for the first time.
Records the current time as the player's last encounter time.
Gets the next interview question starting index and advances the rotation.
Queues an investigation lead for a target player.
Queues an unresolved investigation mention for later resolution.
Records a player's canonical name and normalized aliases for later mention resolution.
Registers a chunk as part of the player's settlement. Returns true if newly added.
Attempts to resolve unresolved mentions into queued investigation leads.
Resets the player's chunk stay counter to zero.
Resolves a free-form player mention to a unique known player ID.
Sets the player's reputation score.
Updates the player's chunk stay duration and returns the new tick count.