Class ResourceOrTagKeyArgument<T>

java.lang.Object
net.minecraft.commands.arguments.ResourceOrTagKeyArgument<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagKeyArgument.Result<T>>

public class ResourceOrTagKeyArgument<T> extends Object implements com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagKeyArgument.Result<T>>
  • Field Details

  • Constructor Details

    • ResourceOrTagKeyArgument

      public ResourceOrTagKeyArgument(ResourceKey<? extends Registry<T>> p_248579_)
  • Method Details

    • resourceOrTagKey

      public static <T> ResourceOrTagKeyArgument<T> resourceOrTagKey(ResourceKey<? extends Registry<T>> p_249175_)
    • getResourceOrTagKey

      public static <T> ResourceOrTagKeyArgument.Result<T> getResourceOrTagKey(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_252162_, String p_248628_, ResourceKey<Registry<T>> p_249008_, com.mojang.brigadier.exceptions.DynamicCommandExceptionType p_251387_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parse

      public ResourceOrTagKeyArgument.Result<T> parse(com.mojang.brigadier.StringReader p_250307_) 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_251659_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_251141_)
      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>