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.RegistryFriendlyByteBuf, SerializableTooltip> -
Constructor Summary
ConstructorsConstructorDescriptionSerializableTooltip(String key, Optional<net.minecraft.network.chat.Style> style) Creates an instance of aSerializableTooltiprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.chat.MutableComponentfinal inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.Optional<net.minecraft.network.chat.Style> style()Returns the value of thestylerecord 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.RegistryFriendlyByteBuf, SerializableTooltip> STREAM_CODEC
-
-
Constructor Details
-
SerializableTooltip
-
-
Method Details
-
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
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-