Package net.minecraft.commands.arguments
Class ResourceKeyArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceKeyArgument<T>
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ResourceKey<T>>
public class ResourceKeyArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ResourceKey<T>>
-
Nested Class Summary
-
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 TypeMethodDescriptionstatic Attribute
getAttribute
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212371_, String p_212372_) static Holder<ConfiguredFeature<?,
?>> getConfiguredFeature
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212389_, String p_212390_) private static <T> Registry<T>
getRegistry
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212379_, ResourceKey<? extends Registry<T>> p_212380_) private static <T> ResourceKey<T>
getRegistryType
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212374_, String p_212375_, ResourceKey<Registry<T>> p_212376_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_212377_) static <T> ResourceKeyArgument<T>
key
(ResourceKey<? extends Registry<T>> p_212387_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_212399_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_212400_) parse
(com.mojang.brigadier.StringReader p_212369_)
-
Field Details
-
EXAMPLES
-
ERROR_UNKNOWN_ATTRIBUTE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_ATTRIBUTE -
ERROR_INVALID_FEATURE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_FEATURE -
registryKey
-
-
Constructor Details
-
ResourceKeyArgument
-
-
Method Details
-
key
-
getRegistryType
private static <T> ResourceKey<T> getRegistryType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212374_, String p_212375_, ResourceKey<Registry<T>> p_212376_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_212377_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRegistry
private static <T> Registry<T> getRegistry(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212379_, ResourceKey<? extends Registry<T>> p_212380_) -
getAttribute
public static Attribute getAttribute(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212371_, String p_212372_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getConfiguredFeature
public static Holder<ConfiguredFeature<?,?>> getConfiguredFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212389_, String p_212390_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public ResourceKey<T> parse(com.mojang.brigadier.StringReader p_212369_) 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_212399_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_212400_) - Specified by:
listSuggestions
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- Specified by:
getExamples
in interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-