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

    • EXAMPLES

      private static final Collection<String> EXAMPLES
    • ERROR_INVALID_BIOME

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_BIOME
    • ERROR_INVALID_STRUCTURE

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_STRUCTURE
    • registryKey

      final ResourceKey<? extends Registry<T>> registryKey
  • 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

      private 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
    • getBiome

      public static ResourceOrTagLocationArgument.Result<Biome> getBiome(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210953_, String p_210954_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getStructureFeature

      public static ResourceOrTagLocationArgument.Result<ConfiguredStructureFeature<?,?>> getStructureFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_210971_, String p_210972_) 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>