Record Class FoliosEntry
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.FoliosEntry
- Record Components:
name- raw, as written: a translation key or text with marks (title()reads it)sort- lower comes first, then by namefeatured- shown first in its category, markedlistings- its pages and elements that the book's index and search list as if each were an entry of its own
public record FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages, @Nullable FoliosReveal.Use reveal, List<FoliosEntry.Listing> listings)
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").-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA page of the entry, or an element of one, written with"index": listed in the book's index and found by its search as an entry is, under a name and an icon of its own, and opening the entry at it.static final recordA page of the entry, with what applies to it whatever its kind. -
Constructor Summary
ConstructorsConstructorDescriptionFoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages) An entry that reveals its pages as its book does.FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages, @Nullable FoliosReveal.Use reveal) An entry with nothing of it listed on its own.FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages, @Nullable FoliosReveal.Use reveal, List<FoliosEntry.Listing> listings) Creates an instance of aFoliosEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfeatured()Returns the value of thefeaturedrecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.id()Returns the value of theidrecord component.booleanisOpen()booleanisQuest()booleanlistings()Returns the value of thelistingsrecord component.lock()Returns the value of thelockrecord component.name()Returns the value of thenamerecord component.Everything its pages ask the player to do; empty for an entry that isn't a quest.pages()Returns the value of thepagesrecord component.@Nullable FoliosReveal.Usereveal()Returns the value of therevealrecord component.intsort()Returns the value of thesortrecord component.net.minecraft.network.chat.Componenttitle()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FoliosEntry
public FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages, @Nullable FoliosReveal.Use reveal, List<FoliosEntry.Listing> listings) Creates an instance of aFoliosEntryrecord class.- Parameters:
id- the value for theidrecord componentcategory- the value for thecategoryrecord componentname- the value for thenamerecord componenticon- the value for theiconrecord componentsort- the value for thesortrecord componentfeatured- the value for thefeaturedrecord componentlock- the value for thelockrecord componentpages- the value for thepagesrecord componentreveal- the value for therevealrecord componentlistings- the value for thelistingsrecord component
-
FoliosEntry
public FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages, @Nullable FoliosReveal.Use reveal) An entry with nothing of it listed on its own. -
FoliosEntry
public FoliosEntry(String id, String category, String name, FoliosIcon icon, int sort, boolean featured, FoliosLock lock, List<FoliosEntry.Page> pages) An entry that reveals its pages as its book does.
-
-
Method Details
-
title
public net.minecraft.network.chat.Component title() -
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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
name
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
sort
-
featured
-
lock
Returns the value of thelockrecord component.- Returns:
- the value of the
lockrecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
reveal
Returns the value of therevealrecord component.- Returns:
- the value of the
revealrecord component
-
listings
-