Class GuideMemory

java.lang.Object
net.ixdarklord.folios.internal.client.GuideMemory

public final class GuideMemory extends Object
  • Field Details

  • Method Details

    • of

      public static GuideMemory of(net.minecraft.resources.Identifier book)
      The player's own memory of a book.
    • forReading

      public static GuideMemory forReading(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.
    • synced

      public static void synced(Map<net.minecraft.resources.Identifier, GuideRecord> records)
      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

      public boolean isRead(String entry)
    • markRead

      public void markRead(String entry)
    • isSeen

      public boolean isSeen(String spread)
      Whether a spread ("<chapter>|<page>") has been shown in full.
    • markSeen

      public void markSeen(String spread)
    • markQuestDone

      public boolean markQuestDone(String entry)
      Notes a quest as done; returns whether it wasn't already.
    • markCelebrated

      public boolean markCelebrated(String what)
      Marks something celebrated; false if it already was.
    • readCount

      public int readCount()
    • bookmarks

      public List<GuideBook.Location> bookmarks()
    • isBookmarked

      public boolean isBookmarked(String entry)
    • toggleBookmark

      public boolean toggleBookmark(GuideBook.Location location)
      Adds a bookmark at a place, or removes the entry's if it has one; returns whether it is bookmarked now.
    • last

      public @Nullable GuideBook.Location last()
    • setLast

      public void setLast(@Nullable GuideBook.Location location)
    • lastChapter

      public @Nullable String lastChapter()
      The chapter key of the spread last open when it wasn't an entry's, or null; see lastPage().
    • lastPage

      public int lastPage()
    • setLastSpread

      public void setLastSpread(@Nullable String chapter, int page)
    • 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.