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 TypeClassDescription(package private) static final record
static interface
static class
(package private) static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final Collection<String>
(package private) final ResourceKey<? extends Registry<T>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBiome
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210953_, String p_210954_) private 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_) getStructureFeature
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210971_, String p_210972_) <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
-
ERROR_INVALID_BIOME
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_BIOME -
ERROR_INVALID_STRUCTURE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_STRUCTURE -
registryKey
-
-
Constructor Details
-
ResourceOrTagLocationArgument
-
-
Method Details
-
resourceOrTag
public static <T> ResourceOrTagLocationArgument<T> resourceOrTag(ResourceKey<? extends Registry<T>> p_210969_) -
getRegistryType
private 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
-
getBiome
public static ResourceOrTagLocationArgument.Result<Biome> getBiome(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210953_, String p_210954_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getStructureFeature
public static ResourceOrTagLocationArgument.Result<ConfiguredStructureFeature<?,?>> getStructureFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210971_, String p_210972_) 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>
-