Package net.minecraft.command.argument
Record Class MessageArgumentType.MessageFormat
java.lang.Object
java.lang.Record
net.minecraft.command.argument.MessageArgumentType.MessageFormat
- Record Components:
contents
-selectors
-
- Enclosing class:
MessageArgumentType
public static record MessageArgumentType.MessageFormat(String contents, MessageArgumentType.MessageSelector[] selectors)
extends Record
- Mappings:
Namespace Name named net/minecraft/command/argument/MessageArgumentType$MessageFormat
intermediary net/minecraft/class_2196$class_2197
official fn$a
named contents
intermediary comp_2653
official a
named selectors
intermediary comp_2654
official b
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageFormat
(String contents, MessageArgumentType.MessageSelector[] selectors) Creates an instance of aMessageFormat
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()
Returns the value of thecontents
record component.final boolean
Indicates whether some other object is "equal to" this one.(package private) Text
format
(ServerCommandSource source) format
(ServerCommandSource source, boolean canUseSelectors) final int
hashCode()
Returns a hash code value for this object.parse
(com.mojang.brigadier.StringReader reader, boolean allowAtSelectors) Returns the value of theselectors
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Method Details
-
format
Text format(ServerCommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector named format
Lnet/minecraft/command/argument/MessageArgumentType$MessageFormat;format(Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/text/Text;
intermediary method_44268
Lnet/minecraft/class_2196$class_2197;method_44268(Lnet/minecraft/class_2168;)Lnet/minecraft/class_2561;
official a
Lfn$a;a(Lew;)Lxv;
-
format
public Text format(ServerCommandSource source, boolean canUseSelectors) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector named format
Lnet/minecraft/command/argument/MessageArgumentType$MessageFormat;format(Lnet/minecraft/server/command/ServerCommandSource;Z)Lnet/minecraft/text/Text;
intermediary method_9341
Lnet/minecraft/class_2196$class_2197;method_9341(Lnet/minecraft/class_2168;Z)Lnet/minecraft/class_2561;
official a
Lfn$a;a(Lew;Z)Lxv;
-
parse
public static MessageArgumentType.MessageFormat parse(com.mojang.brigadier.StringReader reader, boolean allowAtSelectors) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
- Mappings:
Namespace Name Mixin selector named parse
Lnet/minecraft/command/argument/MessageArgumentType$MessageFormat;parse(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/command/argument/MessageArgumentType$MessageFormat;
intermediary method_9342
Lnet/minecraft/class_2196$class_2197;method_9342(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/class_2196$class_2197;
official a
Lfn$a;a(Lcom/mojang/brigadier/StringReader;Z)Lfn$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)
. -
contents
Returns the value of thecontents
record component.- Returns:
- the value of the
contents
record component
-
selectors
Returns the value of theselectors
record component.- Returns:
- the value of the
selectors
record component
-