Record Class NavigationNode
java.lang.Object
java.lang.Record
guideme.navigation.NavigationNode
public record NavigationNode(@Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable net.minecraft.world.item.ItemStackTemplate icon, @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory, List<NavigationNode> children, int position, boolean hasPage, @Nullable Integer maxDepth)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionNavigationNode(@Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable net.minecraft.world.item.ItemStackTemplate icon, List<NavigationNode> children, int position, boolean hasPage) NavigationNode(@Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable net.minecraft.world.item.ItemStackTemplate icon, @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory, List<NavigationNode> children, int position, boolean hasPage) NavigationNode(@Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable net.minecraft.world.item.ItemStackTemplate icon, @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory, List<NavigationNode> children, int position, boolean hasPage, @Nullable Integer maxDepth) 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.@Nullable net.minecraft.world.item.ItemStackTemplateicon()Deprecated, for removal: This API element is subject to removal in a future version.@Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> Returns the value of theiconFactoryrecord component.@Nullable IntegermaxDepth()Returns the value of themaxDepthrecord component.@Nullable net.minecraft.resources.IdentifierpageId()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.Identifier pageId, String title, @Nullable @Nullable net.minecraft.world.item.ItemStackTemplate icon, @Nullable @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory, List<NavigationNode> children, int position, boolean hasPage) -
NavigationNode
public NavigationNode(@Nullable @Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable @Nullable net.minecraft.world.item.ItemStackTemplate icon, List<NavigationNode> children, int position, boolean hasPage) -
NavigationNode
public NavigationNode(@Nullable @Nullable net.minecraft.resources.Identifier pageId, String title, @Nullable @Deprecated(forRemoval=true) @Nullable net.minecraft.world.item.ItemStackTemplate icon, @Nullable @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory, List<NavigationNode> children, int position, boolean hasPage, @Nullable @Nullable Integer maxDepth) Creates an instance of aNavigationNoderecord class.- Parameters:
pageId- the value for thepageIdrecord componenttitle- the value for thetitlerecord componenticon- the value for theiconrecord componenticonFactory- the value for theiconFactoryrecord componentchildren- the value for thechildrenrecord componentposition- the value for thepositionrecord componenthasPage- the value for thehasPagerecord componentmaxDepth- the value for themaxDepthrecord component
-
-
Method Details
-
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. -
pageId
@Nullable public @Nullable net.minecraft.resources.Identifier 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
@Nullable @Deprecated(forRemoval=true) public @Nullable net.minecraft.world.item.ItemStackTemplate icon()Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
iconFactory
@Nullable public @Nullable net.neoforged.neoforge.common.util.Lazy<net.minecraft.world.item.ItemStack> iconFactory()Returns the value of theiconFactoryrecord component.- Returns:
- the value of the
iconFactoryrecord 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
-
maxDepth
Returns the value of themaxDepthrecord component.- Returns:
- the value of the
maxDepthrecord component
-