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 SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final Collection<String> (package private) final ResourceKey<? extends Registry<T>> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Holder.Reference<ConfiguredFeature<?, ?>> getConfiguredFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_249310_, String p_250729_) 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> getRegistryKey(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212374_, String p_212375_, ResourceKey<Registry<T>> p_212376_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_212377_) static Holder.Reference<Structure> getStructure(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248804_, String p_251331_) getStructureTemplatePool(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_252203_, String p_250407_) 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_) private static <T> Holder.Reference<T> resolveKey(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248662_, String p_252172_, ResourceKey<Registry<T>> p_249701_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_249790_) 
- 
Field Details- 
EXAMPLES
- 
ERROR_INVALID_FEATUREprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_FEATURE
- 
ERROR_INVALID_STRUCTUREprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_STRUCTURE
- 
ERROR_INVALID_TEMPLATE_POOLprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_TEMPLATE_POOL
- 
registryKey
 
- 
- 
Constructor Details- 
ResourceKeyArgument
 
- 
- 
Method Details- 
key
- 
getRegistryKeyprivate static <T> ResourceKey<T> getRegistryKey(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
 
- 
getRegistryprivate static <T> Registry<T> getRegistry(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_212379_, ResourceKey<? extends Registry<T>> p_212380_) 
- 
resolveKeyprivate static <T> Holder.Reference<T> resolveKey(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248662_, String p_252172_, ResourceKey<Registry<T>> p_249701_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_249790_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getConfiguredFeaturepublic static Holder.Reference<ConfiguredFeature<?,?>> getConfiguredFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_249310_, String p_250729_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getStructurepublic static Holder.Reference<Structure> getStructure(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248804_, String p_251331_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getStructureTemplatePoolpublic static Holder.Reference<StructureTemplatePool> getStructureTemplatePool(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_252203_, String p_250407_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
parsepublic ResourceKey<T> parse(com.mojang.brigadier.StringReader p_212369_) 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_212399_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_212400_) - Specified by:
- listSuggestionsin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
- 
getExamples- Specified by:
- getExamplesin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
 
-