Record Class TooltipActionType<T extends TextAction>
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.text.action.TooltipActionType<T>
public record TooltipActionType<T extends TextAction>(int type, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,? extends T extends TextAction> streamCodec)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTooltipActionType(int type, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends T> streamCodec) Creates an instance of aTooltipActionTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends T> Returns the value of thestreamCodecrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Constructor Details
-
TooltipActionType
public TooltipActionType(int type, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends T> streamCodec) Creates an instance of aTooltipActionTyperecord class.- Parameters:
type- the value for thetyperecord componentstreamCodec- the value for thestreamCodecrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
streamCodec
public net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf,? extends T> streamCodec()Returns the value of thestreamCodecrecord component.- Returns:
- the value of the
streamCodecrecord component
-