Package net.minecraft.commands.arguments
Class ResourceOrTagKeyArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrTagKeyArgument<T>
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagKeyArgument.Result<T>>
public class ResourceOrTagKeyArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagKeyArgument.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> ResourceOrTagKeyArgument.Result
<T> getResourceOrTagKey
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_252162_, String p_248628_, ResourceKey<Registry<T>> p_249008_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_251387_) <S> CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_251659_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_251141_) parse
(com.mojang.brigadier.StringReader p_250307_) static <T> ResourceOrTagKeyArgument
<T> resourceOrTagKey
(ResourceKey<? extends Registry<T>> p_249175_)
-
Field Details
-
EXAMPLES
-
registryKey
-
-
Constructor Details
-
ResourceOrTagKeyArgument
-
-
Method Details
-
resourceOrTagKey
public static <T> ResourceOrTagKeyArgument<T> resourceOrTagKey(ResourceKey<? extends Registry<T>> p_249175_) -
getResourceOrTagKey
public static <T> ResourceOrTagKeyArgument.Result<T> getResourceOrTagKey(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_252162_, String p_248628_, ResourceKey<Registry<T>> p_249008_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_251387_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public ResourceOrTagKeyArgument.Result<T> parse(com.mojang.brigadier.StringReader p_250307_) 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_251659_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_251141_) - Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-