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 namefeatured- 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").-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA page of the entry, with what applies to it whatever its kind. -
Constructor Summary
ConstructorsConstructorDescriptionGuideEntry(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(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 aGuideEntryrecord 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()booleanlock()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 GuideReveal.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
-
GuideEntry
-
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 aGuideEntryrecord 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 component
-
-
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
-