Package guideme.navigation
Record Class NavigationNode
java.lang.Object
java.lang.Record
guideme.navigation.NavigationNode
public record NavigationNode(@Nullable net.minecraft.resources.ResourceLocation pageId, String title, net.minecraft.world.item.ItemStack icon, List<NavigationNode> children, int position, boolean hasPage)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionNavigationNode(@Nullable net.minecraft.resources.ResourceLocation pageId, String title, net.minecraft.world.item.ItemStack icon, List<NavigationNode> children, int position, boolean hasPage) Creates an instance of aNavigationNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhasPage()Returns the value of thehasPagerecord component.net.minecraft.world.item.ItemStackicon()Returns the value of theiconrecord component.@Nullable net.minecraft.resources.ResourceLocationpageId()Returns the value of thepageIdrecord component.intposition()Returns the value of thepositionrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NavigationNode
public NavigationNode(@Nullable @Nullable net.minecraft.resources.ResourceLocation pageId, String title, net.minecraft.world.item.ItemStack icon, List<NavigationNode> children, int position, boolean hasPage) Creates an instance of aNavigationNoderecord class.- Parameters:
pageId- the value for thepageIdrecord componenttitle- the value for thetitlerecord componenticon- the value for theiconrecord componentchildren- the value for thechildrenrecord componentposition- the value for thepositionrecord componenthasPage- the value for thehasPagerecord component
-
-
Method Details
-
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 '=='. -
pageId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation pageId()Returns the value of thepageIdrecord component.- Returns:
- the value of the
pageIdrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
icon
public net.minecraft.world.item.ItemStack icon()Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
hasPage
public boolean hasPage()Returns the value of thehasPagerecord component.- Returns:
- the value of the
hasPagerecord component
-