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 th$aintermediary net/minecraft/class_2556$class_7602named net/minecraft/network/message/MessageType$Parametersofficial aintermediary comp_919named typeofficial bintermediary comp_920named nameofficial cintermediary comp_921named targetName
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextThe field for thenamerecord component.The field for thetargetNamerecord component.private final MessageTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParameters(MessageType type, Text name) Parameters(MessageType messageType, Text text, @Nullable Text text2) -
Method Summary
Modifier and TypeMethodDescriptionapplyChatDecoration(Text content) applyNarrationDecoration(Text content) final 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.toSerialized(DynamicRegistryManager registryManager) Returns a serialized version of this instance used in packets.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.withTargetName(Text targetName) Returns a new instance with the given target name.
-
Field Details
-
type
The field for thetyperecord component. -
name
The field for thenamerecord component. -
targetName
The field for thetargetNamerecord component.
-
-
Constructor Details
-
Parameters
Parameters(MessageType type, Text name) - Mappings:
Namespace Name Mixin selector official <init>Lth$a;<init>(Lth;Ltl;)Vintermediary <init>Lnet/minecraft/class_2556$class_7602;<init>(Lnet/minecraft/class_2556;Lnet/minecraft/class_2561;)Vnamed <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 aLth$a;a(Ltl;)Ltl;intermediary method_44837Lnet/minecraft/class_2556$class_7602;method_44837(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;named applyChatDecorationLnet/minecraft/network/message/MessageType$Parameters;applyChatDecoration(Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;
-
applyNarrationDecoration
- Mappings:
Namespace Name Mixin selector official bLth$a;b(Ltl;)Ltl;intermediary method_44838Lnet/minecraft/class_2556$class_7602;method_44838(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;named applyNarrationDecorationLnet/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
TeamMsgCommandand as the recipient name inMessageCommand.- Returns:
- a new instance with the given target name
- Mappings:
Namespace Name Mixin selector official cLth$a;c(Ltl;)Lth$a;intermediary method_44839Lnet/minecraft/class_2556$class_7602;method_44839(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2556$class_7602;named withTargetNameLnet/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 aLth$a;a(Lhr;)Lth$b;intermediary method_44836Lnet/minecraft/class_2556$class_7602;method_44836(Lnet/minecraft/class_5455;)Lnet/minecraft/class_2556$class_7603;named toSerializedLnet/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 thetyperecord component.- Returns:
- the value of the
typerecord 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
-