Package net.ixdarklord.folios.api.client
Record Class GuideCategory
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideCategory
- Record Components:
name- raw, as written (title()reads it)description- raw marked-up text shown above its entries; empty for nonesort- lower comes first, then by namecolor- its tab's colour (RGB,"color"in its JSON); -1 for the book's own
public record GuideCategory(String id, String name, String description, GuideIcon icon, int sort, GuideLock lock, int color)
extends Record
A category of a book's entries. Read from
categories/<id>.json in the book's folder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.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()booleanlock()Returns the value of thelockrecord component.name()Returns the value of thenamerecord 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
-
GuideCategory
public GuideCategory(String id, String name, String description, GuideIcon icon, int sort, GuideLock lock, int color) Creates an instance of aGuideCategoryrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componenticon- the value for theiconrecord componentsort- the value for thesortrecord componentlock- the value for thelockrecord componentcolor- the value for thecolorrecord component
-
-
Method Details
-
title
public net.minecraft.network.chat.Component title() -
isOpen
public boolean isOpen() -
isVisible
public boolean isVisible() -
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. -
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. -
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
sort
public int sort()Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-
lock
Returns the value of thelockrecord component.- Returns:
- the value of the
lockrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-