Class GuideMemory
java.lang.Object
net.ixdarklord.folios.internal.client.GuideMemory
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Forgets everything read and shown, for the "start over" button.static voidforget()Forgets every memory, as the player leaves a world or server: the next one has its own.static GuideMemoryforReading(GuideBook book, @Nullable net.minecraft.world.InteractionHand hand) The memory a reader of a book uses: for a book that keeps its own ("progress": "book") opened from a copy in a hand, that copy's; otherwise the player's.booleanisBookmarked(String entry) booleanbooleanWhether a spread ("<chapter>|<page>") has been shown in full.@Nullable GuideBook.Locationlast()@Nullable StringThe chapter key of the spread last open when it wasn't an entry's, or null; seelastPage().intlastPage()booleanleftOpen()Whether the book was put away lying open (a handheld book), to open by itself next time.booleanmarkCelebrated(String what) Marks something celebrated; false if it already was.booleanmarkQuestDone(String entry) Notes a quest as done; returns whether it wasn't already.voidvoidstatic GuideMemoryof(net.minecraft.resources.ResourceLocation book) The player's own memory of a book.intvoidsave()Sends what changed to the server to keep (and, for a copy's, the player's too).voidsetLast(@Nullable GuideBook.Location location) voidsetLastSpread(@Nullable String chapter, int page) voidsetLeftOpen(boolean open) static voidsynced(Map<net.minecraft.resources.ResourceLocation, GuideRecord> records) The server has synced the player's records: each memory without unsent changes takes its book's.booleantoggleBookmark(GuideBook.Location location) Adds a bookmark at a place, or removes the entry's if it has one; returns whether it is bookmarked now.
-
Field Details
-
MAX_BOOKMARKS
public static final int MAX_BOOKMARKS- See Also:
-
-
Method Details
-
of
The player's own memory of a book. -
forReading
public static GuideMemory forReading(GuideBook book, @Nullable @Nullable net.minecraft.world.InteractionHand hand) The memory a reader of a book uses: for a book that keeps its own ("progress": "book") opened from a copy in a hand, that copy's; otherwise the player's. -
synced
The server has synced the player's records: each memory without unsent changes takes its book's. -
forget
public static void forget()Forgets every memory, as the player leaves a world or server: the next one has its own. -
save
public void save()Sends what changed to the server to keep (and, for a copy's, the player's too). -
isRead
-
markRead
-
isSeen
Whether a spread ("<chapter>|<page>") has been shown in full. -
markSeen
-
markQuestDone
Notes a quest as done; returns whether it wasn't already. -
markCelebrated
Marks something celebrated; false if it already was. -
readCount
public int readCount() -
bookmarks
-
isBookmarked
-
toggleBookmark
Adds a bookmark at a place, or removes the entry's if it has one; returns whether it is bookmarked now. -
last
-
setLast
-
lastChapter
The chapter key of the spread last open when it wasn't an entry's, or null; seelastPage(). -
lastPage
public int lastPage() -
setLastSpread
-
leftOpen
public boolean leftOpen()Whether the book was put away lying open (a handheld book), to open by itself next time. -
setLeftOpen
public void setLeftOpen(boolean open) -
clear
public void clear()Forgets everything read and shown, for the "start over" button.
-