Record Class SerializableTooltip
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.client.tooltip.SerializableTooltip
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SerializableTooltip> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SerializableTooltip> -
Constructor Summary
ConstructorsConstructorDescriptionSerializableTooltip(String key, Optional<List<net.minecraft.ChatFormatting>> formats) Creates an instance of aSerializableTooltiprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.formats()Returns the value of theformatsrecord component.static SerializableTooltipfromComponent(String key, net.minecraft.ChatFormatting... formats) net.minecraft.network.chat.MutableComponentfinal inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SerializableTooltip> STREAM_CODEC
-
-
Constructor Details
-
SerializableTooltip
-
-
Method Details
-
fromComponent
public static SerializableTooltip fromComponent(String key, net.minecraft.ChatFormatting... formats) -
getComponent
public net.minecraft.network.chat.MutableComponent getComponent() -
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. All components in this record class are compared withObjects::equals(Object,Object). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
formats
-