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$MessageFormatintermediary net/minecraft/class_2196$class_2197official fd$anamed contentsintermediary comp_2653official anamed selectorsintermediary comp_2654official b
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageFormat(String contents, MessageArgumentType.MessageSelector[] selectors) Creates an instance of aMessageFormatrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.(package private) Textformat(ServerCommandSource source) format(ServerCommandSource source, boolean canUseSelectors) final inthashCode()Returns a hash code value for this object.parse(com.mojang.brigadier.StringReader reader, boolean allowAtSelectors) Returns the value of theselectorsrecord component.final StringtoString()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 formatLnet/minecraft/command/argument/MessageArgumentType$MessageFormat;format(Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/text/Text;intermediary method_44268Lnet/minecraft/class_2196$class_2197;method_44268(Lnet/minecraft/class_2168;)Lnet/minecraft/class_2561;official aLfd$a;a(Lek;)Lxo;
-
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 formatLnet/minecraft/command/argument/MessageArgumentType$MessageFormat;format(Lnet/minecraft/server/command/ServerCommandSource;Z)Lnet/minecraft/text/Text;intermediary method_9341Lnet/minecraft/class_2196$class_2197;method_9341(Lnet/minecraft/class_2168;Z)Lnet/minecraft/class_2561;official aLfd$a;a(Lek;Z)Lxo;
-
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 parseLnet/minecraft/command/argument/MessageArgumentType$MessageFormat;parse(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/command/argument/MessageArgumentType$MessageFormat;intermediary method_9342Lnet/minecraft/class_2196$class_2197;method_9342(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/class_2196$class_2197;official aLfd$a;a(Lcom/mojang/brigadier/StringReader;Z)Lfd$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 thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-
selectors
Returns the value of theselectorsrecord component.- Returns:
- the value of the
selectorsrecord component
-