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$bintermediary net/minecraft/class_2556$class_7603named net/minecraft/network/message/MessageType$Serializedofficial aintermediary comp_922named typeIdofficial bintermediary comp_923named nameofficial cintermediary comp_924named targetName
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextThe field for thenamerecord component.The field for thetargetNamerecord component.private final intThe field for thetypeIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSerialized(int int2, Text text, @Nullable Text text2) Serialized(PacketByteBuf buf) -
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.name()Returns the value of thenamerecord component.Returns the value of thetargetNamerecord component.toParameters(DynamicRegistryManager registryManager) Returns a deserialized version of this instance, orOptional.empty()iftypeIdis unknown to the client.final StringtoString()Returns a string representation of this record class.inttypeId()Returns the value of thetypeIdrecord component.voidwrite(PacketByteBuf buf)
-
Field Details
-
typeId
private final int typeIdThe field for thetypeIdrecord component. -
name
The field for thenamerecord component. -
targetName
The field for thetargetNamerecord component.
-
-
Constructor Details
-
Serialized
- Mappings:
Namespace Name Mixin selector official <init>Lvb$b;<init>(Lui;)Vintermediary <init>Lnet/minecraft/class_2556$class_7603;<init>(Lnet/minecraft/class_2540;)Vnamed <init>Lnet/minecraft/network/message/MessageType$Serialized;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
Serialized
-
-
Method Details
-
write
- Mappings:
Namespace Name Mixin selector official aLvb$b;a(Lui;)Vintermediary method_44841Lnet/minecraft/class_2556$class_7603;method_44841(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/network/message/MessageType$Serialized;write(Lnet/minecraft/network/PacketByteBuf;)V
-
toParameters
Returns a deserialized version of this instance, orOptional.empty()iftypeIdis unknown to the client.- Returns:
- a deserialized version of this instance, or
Optional.empty()iftypeIdis unknown to the client - Mappings:
Namespace Name Mixin selector official aLvb$b;a(Liu;)Ljava/util/Optional;intermediary method_44840Lnet/minecraft/class_2556$class_7603;method_44840(Lnet/minecraft/class_5455;)Ljava/util/Optional;named toParametersLnet/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 thetypeIdrecord component.- Returns:
- the value of the
typeIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
targetName
Returns the value of thetargetNamerecord component.- Returns:
- the value of the
targetNamerecord component
-