Package net.minecraft.network.message
Record Class MessageType.Serialized
java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageType.Serialized
- Record Components:
typeId
-name
-targetName
-
- Enclosing class:
MessageType
public static record MessageType.Serialized(int typeId, Text name, @Nullable Text targetName)
extends Record
The serialized version of
MessageType.Parameters
that is used in packets.- Mappings:
Namespace Name official vb$b
intermediary net/minecraft/class_2556$class_7603
named net/minecraft/network/message/MessageType$Serialized
official a
intermediary comp_922
named typeId
official b
intermediary comp_923
named name
official c
intermediary comp_924
named targetName
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Text
The field for thename
record component.The field for thetargetName
record component.private final int
The field for thetypeId
record component. -
Constructor Summary
ConstructorDescriptionSerialized
(int int2, Text text, @Nullable Text text2) Serialized
(PacketByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.Returns the value of thetargetName
record component.toParameters
(DynamicRegistryManager registryManager) Returns a deserialized version of this instance, orOptional.empty()
iftypeId
is unknown to the client.final String
toString()
Returns a string representation of this record class.int
typeId()
Returns the value of thetypeId
record component.void
write
(PacketByteBuf buf)
-
Field Details
-
typeId
private final int typeIdThe field for thetypeId
record component. -
name
The field for thename
record component. -
targetName
The field for thetargetName
record component.
-
-
Constructor Details
-
Serialized
- Mappings:
Namespace Name Mixin selector official <init>
Lvb$b;<init>(Lui;)V
intermediary <init>
Lnet/minecraft/class_2556$class_7603;<init>(Lnet/minecraft/class_2540;)V
named <init>
Lnet/minecraft/network/message/MessageType$Serialized;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
Serialized
-
-
Method Details
-
write
- Mappings:
Namespace Name Mixin selector official a
Lvb$b;a(Lui;)V
intermediary method_44841
Lnet/minecraft/class_2556$class_7603;method_44841(Lnet/minecraft/class_2540;)V
named write
Lnet/minecraft/network/message/MessageType$Serialized;write(Lnet/minecraft/network/PacketByteBuf;)V
-
toParameters
Returns a deserialized version of this instance, orOptional.empty()
iftypeId
is unknown to the client.- Returns:
- a deserialized version of this instance, or
Optional.empty()
iftypeId
is unknown to the client - Mappings:
Namespace Name Mixin selector official a
Lvb$b;a(Liu;)Ljava/util/Optional;
intermediary method_44840
Lnet/minecraft/class_2556$class_7603;method_44840(Lnet/minecraft/class_5455;)Ljava/util/Optional;
named toParameters
Lnet/minecraft/network/message/MessageType$Serialized;toParameters(Lnet/minecraft/registry/DynamicRegistryManager;)Ljava/util/Optional;
-
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 '=='. -
typeId
public int typeId()Returns the value of thetypeId
record component.- Returns:
- the value of the
typeId
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
targetName
Returns the value of thetargetName
record component.- Returns:
- the value of the
targetName
record component
-