Package guideme
Record Class GuideItemSettings
java.lang.Object
java.lang.Record
guideme.GuideItemSettings
public record GuideItemSettings(Optional<net.minecraft.network.chat.Component> displayName, List<net.minecraft.network.chat.Component> tooltipLines, Optional<net.minecraft.resources.ResourceLocation> itemModel)
extends Record
Configuration settings for the automatically generated guide item.
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec
<GuideItemSettings> static GuideItemSettings
-
Constructor Summary
ConstructorDescriptionGuideItemSettings
(Optional<net.minecraft.network.chat.Component> displayName, List<net.minecraft.network.chat.Component> tooltipLines, Optional<net.minecraft.resources.ResourceLocation> itemModel) Creates an instance of aGuideItemSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionOptional
<net.minecraft.network.chat.Component> Returns the value of thedisplayName
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.Optional
<net.minecraft.resources.ResourceLocation> Returns the value of theitemModel
record component.List
<net.minecraft.network.chat.Component> Returns the value of thetooltipLines
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
CODEC
-
-
Constructor Details
-
GuideItemSettings
public GuideItemSettings(Optional<net.minecraft.network.chat.Component> displayName, List<net.minecraft.network.chat.Component> tooltipLines, Optional<net.minecraft.resources.ResourceLocation> itemModel) Creates an instance of aGuideItemSettings
record class.- Parameters:
displayName
- the value for thedisplayName
record componenttooltipLines
- the value for thetooltipLines
record componentitemModel
- the value for theitemModel
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-
tooltipLines
Returns the value of thetooltipLines
record component.- Returns:
- the value of the
tooltipLines
record component
-
itemModel
Returns the value of theitemModel
record component.- Returns:
- the value of the
itemModel
record component
-