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
ConstructorDescriptionNavigationNode
(@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 aNavigationNode
record class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()
Returns the value of thechildren
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
hasPage()
Returns the value of thehasPage
record component.net.minecraft.world.item.ItemStack
icon()
Returns the value of theicon
record component.@Nullable net.minecraft.resources.ResourceLocation
pageId()
Returns the value of thepageId
record component.int
position()
Returns the value of theposition
record component.title()
Returns the value of thetitle
record component.final String
toString()
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 aNavigationNode
record class.- Parameters:
pageId
- the value for thepageId
record componenttitle
- the value for thetitle
record componenticon
- the value for theicon
record componentchildren
- the value for thechildren
record componentposition
- the value for theposition
record componenthasPage
- the value for thehasPage
record 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 thepageId
record component.- Returns:
- the value of the
pageId
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
icon
public net.minecraft.world.item.ItemStack icon()Returns the value of theicon
record component.- Returns:
- the value of the
icon
record component
-
children
Returns the value of thechildren
record component.- Returns:
- the value of the
children
record component
-
position
public int position()Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
hasPage
public boolean hasPage()Returns the value of thehasPage
record component.- Returns:
- the value of the
hasPage
record component
-