Class ComponentArgument
java.lang.Object
net.minecraft.util.parsing.packrat.commands.ParserBasedArgument<Component>
net.minecraft.commands.arguments.ComponentArgument
- All Implemented Interfaces:
ArgumentType<Component>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicCommandExceptionTypeprivate static final Collection<String> private static final DynamicOps<Tag> private static final CommandArgumentParser<Tag> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentgetRawComponent(CommandContext<CommandSourceStack> context, String name) static ComponentgetResolvedComponent(CommandContext<CommandSourceStack> context, String name) static ComponentgetResolvedComponent(CommandContext<CommandSourceStack> context, String name, Entity contentEntity) static ComponentArgumenttextComponent(CommandBuildContext context) Methods inherited from class ParserBasedArgument
listSuggestions, parseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_COMPONENT
-
OPS
-
TAG_PARSER
-
-
Constructor Details
-
ComponentArgument
-
-
Method Details
-
getRawComponent
-
getResolvedComponent
public static Component getResolvedComponent(CommandContext<CommandSourceStack> context, String name, Entity contentEntity) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getResolvedComponent
public static Component getResolvedComponent(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
textComponent
-
getExamples
-