Class ComponentArgument
java.lang.Object
net.minecraft.util.parsing.packrat.commands.ParserBasedArgument<Component>
net.minecraft.commands.arguments.ComponentArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Component>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final Collection<String> private static final com.mojang.serialization.DynamicOps<Tag> private static final CommandArgumentParser<Tag> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentgetRawComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) static ComponentgetResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) static ComponentgetResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name, @Nullable 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 com.mojang.brigadier.arguments.ArgumentType
parse
-
Field Details
-
EXAMPLES
-
ERROR_INVALID_COMPONENT
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_COMPONENT -
OPS
-
TAG_PARSER
-
-
Constructor Details
-
ComponentArgument
-
-
Method Details
-
getRawComponent
public static Component getRawComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) -
getResolvedComponent
public static Component getResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name, @Nullable Entity contentEntity) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getResolvedComponent
public static Component getResolvedComponent(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
textComponent
-
getExamples
-