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(RegistryEntry<MessageType> type, Text name, Optional<Text> targetName)
extends Record
A record holding the message type and the decoration parameters.
- Mappings:
Namespace Name named net/minecraft/network/message/MessageType$Parametersintermediary net/minecraft/class_2556$class_7602official wl$anamed typeintermediary comp_919official bnamed nameintermediary comp_920official cnamed targetNameintermediary comp_921official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<RegistryByteBuf, MessageType.Parameters> private final TextThe field for thenamerecord component.The field for thetargetNamerecord component.private final RegistryEntry<MessageType> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParameters(RegistryEntry<MessageType> type, Text name) Parameters(RegistryEntry<MessageType> registryEntry, Text text, Optional<Text> optional) -
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.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. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/message/MessageType$Parameters;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48776Lnet/minecraft/class_2556$class_7602;field_48776:Lnet/minecraft/class_9139;official aLwl$a;a:Lyn;
-
-
Constructor Details
-
Parameters
Parameters(RegistryEntry<MessageType> type, Text name) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/network/message/MessageType$Parameters;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/text/Text;)Vintermediary <init>Lnet/minecraft/class_2556$class_7602;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_2561;)Vofficial <init>Lwl$a;<init>(Ljr;Lwp;)V
-
Parameters
-
-
Method Details
-
applyChatDecoration
- Mappings:
Namespace Name Mixin selector named applyChatDecorationLnet/minecraft/network/message/MessageType$Parameters;applyChatDecoration(Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;intermediary method_44837Lnet/minecraft/class_2556$class_7602;method_44837(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;official aLwl$a;a(Lwp;)Lwp;
-
applyNarrationDecoration
- Mappings:
Namespace Name Mixin selector named applyNarrationDecorationLnet/minecraft/network/message/MessageType$Parameters;applyNarrationDecoration(Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;intermediary method_44838Lnet/minecraft/class_2556$class_7602;method_44838(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;official bLwl$a;b(Lwp;)Lwp;
-
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 named withTargetNameLnet/minecraft/network/message/MessageType$Parameters;withTargetName(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/MessageType$Parameters;intermediary method_44839Lnet/minecraft/class_2556$class_7602;method_44839(Lnet/minecraft/class_2561;)Lnet/minecraft/class_2556$class_7602;official cLwl$a;c(Lwp;)Lwl$a;
-
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
-