Record Class ScreenMessageKey<D>
java.lang.Object
java.lang.Record
io.github.cottonmc.cotton.gui.networking.ScreenMessageKey<D>
- Type Parameters:
D- the message data type- Record Components:
id- the message idcodec- the codec used to encode and decode message data
-
Constructor Summary
ConstructorsConstructorDescriptionScreenMessageKey(net.minecraft.resources.Identifier id, com.mojang.serialization.Codec<D> codec) Creates an instance of aScreenMessageKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<D> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScreenMessageKey
-
-
Method Details
-
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). -
id
-
codec
-