Record Class ResearchPage
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.api.research.ResearchPage
- Record Components:
id- The unique identifier for this pageicon- The icon to display for this pageiconResearchKey- The researchPack key used to look up the ClientResearchIcon (usually the first root's key)researches- All researches belonging to this page
public record ResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches)
extends Record
Kinda like Quest Book tabs
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
ConstructorsConstructorDescriptionResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches) Creates an instance of aResearchPagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResearchPage.Builderbuilder(net.minecraft.resources.ResourceLocation id) booleancontainsResearch(net.minecraft.resources.ResourceKey<Research> res) 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.net.minecraft.resources.ResourceKey<Research> Returns the value of theiconResearchKeyrecord component.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> Returns the value of theresearchesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_PAGE_ID
public static final net.minecraft.resources.ResourceLocation DEFAULT_PAGE_ID
-
-
Constructor Details
-
ResearchPage
public ResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches) Creates an instance of aResearchPagerecord class.- Parameters:
id- the value for theidrecord componenticon- the value for theiconrecord componenticonResearchKey- the value for theiconResearchKeyrecord componentresearches- the value for theresearchesrecord component
-
-
Method Details
-
containsResearch
-
builder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
iconResearchKey
Returns the value of theiconResearchKeyrecord component.- Returns:
- the value of the
iconResearchKeyrecord component
-
researches
public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches()Returns the value of theresearchesrecord component.- Returns:
- the value of the
researchesrecord component
-