Package net.minecraft.commands.arguments
Class ResourceOrTagLocationArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrTagLocationArgument<T>
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagLocationArgument.Result<T>>
public class ResourceOrTagLocationArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagLocationArgument.Result<T>>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) static final record
static interface
(package private) static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Collection<String>
(package private) final ResourceKey<? extends Registry<T>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ResourceOrTagLocationArgument.Result<T>
getRegistryType
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210956_, String p_210957_, ResourceKey<Registry<T>> p_210958_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_210959_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_210977_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_210978_) parse
(com.mojang.brigadier.StringReader p_210951_) static <T> ResourceOrTagLocationArgument<T>
resourceOrTag
(ResourceKey<? extends Registry<T>> p_210969_)
-
Field Details
-
EXAMPLES
-
registryKey
-
-
Constructor Details
-
ResourceOrTagLocationArgument
-
-
Method Details
-
resourceOrTag
public static <T> ResourceOrTagLocationArgument<T> resourceOrTag(ResourceKey<? extends Registry<T>> p_210969_) -
getRegistryType
public static <T> ResourceOrTagLocationArgument.Result<T> getRegistryType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210956_, String p_210957_, ResourceKey<Registry<T>> p_210958_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_210959_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public ResourceOrTagLocationArgument.Result<T> parse(com.mojang.brigadier.StringReader p_210951_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parse
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_210977_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_210978_) - Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-