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

  • Constructor Details

    • ResourceOrTagLocationArgument

      public ResourceOrTagLocationArgument(ResourceKey<? extends Registry<T>> p_210949_)
  • Method Details

    • resourceOrTag

      public static <T> ResourceOrTagLocationArgument<T> resourceOrTag(ResourceKey<? extends Registry<T>> p_210969_)
    • getRegistryType

      public 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
    • parse

      public ResourceOrTagLocationArgument.Result<T> parse(com.mojang.brigadier.StringReader p_210951_) 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_210977_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_210978_)
      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>