Package net.minecraft.network.message
Record Class MessageType.Parameters
java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageType.Parameters
- Record Components:
type
-name
-targetName
-
- Enclosing class:
MessageType
public static record MessageType.Parameters(MessageType type, Text name, @Nullable Text targetName)
extends Record
A record holding the message type and the decoration parameters.
- Mappings:
Namespace Name official so$a
intermediary net/minecraft/class_2556$class_7602
named net/minecraft/network/message/MessageType$Parameters
official a
intermediary comp_919
named type
official b
intermediary comp_920
named name
official c
intermediary comp_921
named targetName
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Text
The field for thename
record component.The field for thetargetName
record component.private final MessageType
The field for thetype
record component. -
Constructor Summary
ConstructorDescriptionParameters
(MessageType type, Text name) Parameters
(MessageType messageType, Text text, @Nullable Text text2) -
Method Summary
Modifier and TypeMethodDescriptionapplyChatDecoration
(Text content) applyNarrationDecoration
(Text content) final 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.toSerialized
(DynamicRegistryManager registryManager) Returns a serialized version of this instance used in packets.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.withTargetName
(Text targetName) Returns a new instance with the given target name.
-
Field Details
-
type
The field for thetype
record component. -
name
The field for thename
record component. -
targetName
The field for thetargetName
record component.
-
-
Constructor Details
-
Parameters
Parameters(MessageType type, Text name) - Mappings:
Namespace Name Mixin selector official <init>
Lso$a;<init>(Lso;Lss;)V
intermediary <init>
Lnet/minecraft/class_2556$class_7602;<init>(Lnet/minecraft/class_2556;Lnet/minecraft/class_2561;)V
named <init>
Lnet/minecraft/network/message/MessageType$Parameters;<init>(Lnet/minecraft/network/message/MessageType;Lnet/minecraft/text/Text;)V
-
Parameters
-
-
Method Details
-
applyChatDecoration
- Mappings:
Namespace Name Mixin selector official a
Lso$a;a(Lss;)Lss;
intermediary method_44837
Lnet/minecraft/class_2556$class_7602;method_44837(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;
named applyChatDecoration
Lnet/minecraft/network/message/MessageType$Parameters;applyChatDecoration(Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;
-
applyNarrationDecoration
- Mappings:
Namespace Name Mixin selector official b
Lso$a;b(Lss;)Lss;
intermediary method_44838
Lnet/minecraft/class_2556$class_7602;method_44838(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;
named applyNarrationDecoration
Lnet/minecraft/network/message/MessageType$Parameters;applyNarrationDecoration(Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;
-
withTargetName
Returns a new instance with the given target name.Target name is used as the team name in
TeamMsgCommand
and as the recipient name inMessageCommand
.- Returns:
- a new instance with the given target name
- Mappings:
Namespace Name Mixin selector official c
Lso$a;c(Lss;)Lso$a;
intermediary method_44839
Lnet/minecraft/class_2556$class_7602;method_44839(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2556$class_7602;
named withTargetName
Lnet/minecraft/network/message/MessageType$Parameters;withTargetName(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/MessageType$Parameters;
-
toSerialized
Returns a serialized version of this instance used in packets.- Returns:
- a serialized version of this instance used in packets
- Mappings:
Namespace Name Mixin selector official a
Lso$a;a(Lhn;)Lso$b;
intermediary method_44836
Lnet/minecraft/class_2556$class_7602;method_44836(Lnet/minecraft/class_5455;)Lnet/minecraft/class_2556$class_7603;
named toSerialized
Lnet/minecraft/network/message/MessageType$Parameters;toSerialized(Lnet/minecraft/registry/DynamicRegistryManager;)Lnet/minecraft/network/message/MessageType$Serialized;
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
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
-