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>>
  • Field Details

    • EXAMPLES

      private static final Collection<String> 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

      final ResourceKey<? extends Registry<T>> registryKey
  • Constructor Details

  • Method Details

    • key

      public static <T> ResourceKeyArgument<T> key(ResourceKey<? extends Registry<T>> p_212387_)
    • 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 interface com.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 interface com.mojang.brigadier.arguments.ArgumentType<T>
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<T>