Record Class ItemTooltipData
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.text.tooltip.ItemTooltipData
public record ItemTooltipData(Optional<net.minecraft.world.item.crafting.Ingredient> filter, Optional<TooltipRequirements> requirements, List<TextAction> actions)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ItemTooltipData> -
Constructor Summary
ConstructorsConstructorDescriptionItemTooltipData(Optional<net.minecraft.world.item.crafting.Ingredient> filter, Optional<TooltipRequirements> requirements, List<TextAction> actions) Creates an instance of aItemTooltipDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.final booleanIndicates whether some other object is "equal to" this one.Optional<net.minecraft.world.item.crafting.Ingredient> filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therequirementsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ItemTooltipData> STREAM_CODEC
-
-
Constructor Details
-
ItemTooltipData
public ItemTooltipData(Optional<net.minecraft.world.item.crafting.Ingredient> filter, Optional<TooltipRequirements> requirements, List<TextAction> actions) Creates an instance of aItemTooltipDatarecord class.- Parameters:
filter- the value for thefilterrecord componentrequirements- the value for therequirementsrecord componentactions- the value for theactionsrecord 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). -
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-