Package net.minecraft.commands.arguments
Class ResourceOrTagArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrTagArgument<T>
- All Implemented Interfaces:
- com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagArgument.Result<T>>
public class ResourceOrTagArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagArgument.Result<T>>
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class(package private) static final recordstatic interface(package private) static final record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeprivate static final Collection<String>(package private) final ResourceKey<? extends Registry<T>>private final HolderLookup<T>
- 
Constructor SummaryConstructorsConstructorDescriptionResourceOrTagArgument(CommandBuildContext p_249382_, ResourceKey<? extends Registry<T>> p_251209_) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> ResourceOrTagArgument.Result<T>getResourceOrTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_249001_, String p_251520_, ResourceKey<Registry<T>> p_250370_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_250223_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_252354_) parse(com.mojang.brigadier.StringReader p_250860_) static <T> ResourceOrTagArgument<T>resourceOrTag(CommandBuildContext p_251101_, ResourceKey<? extends Registry<T>> p_248888_) 
- 
Field Details- 
EXAMPLES
- 
ERROR_UNKNOWN_TAGprivate static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_UNKNOWN_TAG
- 
ERROR_INVALID_TAG_TYPEprivate static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_INVALID_TAG_TYPE
- 
registryLookup
- 
registryKey
 
- 
- 
Constructor Details- 
ResourceOrTagArgumentpublic ResourceOrTagArgument(CommandBuildContext p_249382_, ResourceKey<? extends Registry<T>> p_251209_) 
 
- 
- 
Method Details- 
resourceOrTagpublic static <T> ResourceOrTagArgument<T> resourceOrTag(CommandBuildContext p_251101_, ResourceKey<? extends Registry<T>> p_248888_) 
- 
getResourceOrTagpublic static <T> ResourceOrTagArgument.Result<T> getResourceOrTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_249001_, String p_251520_, ResourceKey<Registry<T>> p_250370_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
parsepublic ResourceOrTagArgument.Result<T> parse(com.mojang.brigadier.StringReader p_250860_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
- parsein interface- com.mojang.brigadier.arguments.ArgumentType<T>
- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
listSuggestionspublic <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_250223_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_252354_) - Specified by:
- listSuggestionsin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
- 
getExamples- Specified by:
- getExamplesin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
 
-