Record Class GuideEntry

java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideEntry
Record Components:
name - raw, as written: a translation key or text with marks (title() reads it)
sort - lower comes first, then by name
featured - shown first in its category, marked

public record GuideEntry(String id, String category, String name, GuideIcon icon, int sort, boolean featured, GuideLock lock, List<GuideEntry.Page> pages, @Nullable GuideReveal.Use reveal) extends Record
An entry of a book: a titled run of pages, in a category. Read from entries/<id>.json in the book's folder; its id is that path ("basics/first_steps").
  • Constructor Details

    • GuideEntry

      public GuideEntry(String id, String category, String name, GuideIcon icon, int sort, boolean featured, GuideLock lock, List<GuideEntry.Page> pages)
      An entry that reveals its pages as its book does.
    • GuideEntry

      public GuideEntry(String id, String category, String name, GuideIcon icon, int sort, boolean featured, GuideLock lock, List<GuideEntry.Page> pages, @Nullable GuideReveal.Use reveal)
      Creates an instance of a GuideEntry record class.
      Parameters:
      id - the value for the id record component
      category - the value for the category record component
      name - the value for the name record component
      icon - the value for the icon record component
      sort - the value for the sort record component
      featured - the value for the featured record component
      lock - the value for the lock record component
      pages - the value for the pages record component
      reveal - the value for the reveal record component
  • Method Details

    • title

      public net.minecraft.network.chat.Component title()
    • objectives

      public List<GuideObjective> objectives()
      Everything its pages ask the player to do; empty for an entry that isn't a quest.
    • isQuest

      public boolean isQuest()
    • isOpen

      public boolean isOpen()
    • isVisible

      public boolean isVisible()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • category

      public String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • icon

      public GuideIcon icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • sort

      public int sort()
      Returns the value of the sort record component.
      Returns:
      the value of the sort record component
    • featured

      public boolean featured()
      Returns the value of the featured record component.
      Returns:
      the value of the featured record component
    • lock

      public GuideLock lock()
      Returns the value of the lock record component.
      Returns:
      the value of the lock record component
    • pages

      public List<GuideEntry.Page> pages()
      Returns the value of the pages record component.
      Returns:
      the value of the pages record component
    • reveal

      public @Nullable GuideReveal.Use reveal()
      Returns the value of the reveal record component.
      Returns:
      the value of the reveal record component