Class TagArgument<T>

java.lang.Object
net.darkhax.bookshelf.common.api.commands.args.TagArgument<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.minecraft.tags.TagKey<T>>

public class TagArgument<T> extends Object implements com.mojang.brigadier.arguments.ArgumentType<net.minecraft.tags.TagKey<T>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ArgumentSerializer<TagArgument<?>,net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> TagArgument<T>
    arg(net.minecraft.commands.CommandBuildContext context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry)
     
    static <T> net.minecraft.tags.TagKey<T>
    get(String argName, com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry)
     
     
    <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
    listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
     
    net.minecraft.tags.TagKey<T>
    parse(com.mojang.brigadier.StringReader reader)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType

    parse
  • Field Details

    • SERIALIZER

      public static final ArgumentSerializer<TagArgument<?>,net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>> SERIALIZER
  • Method Details

    • parse

      public net.minecraft.tags.TagKey<T> parse(com.mojang.brigadier.StringReader reader) 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> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      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>
    • arg

      public static <T> TagArgument<T> arg(net.minecraft.commands.CommandBuildContext context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry)
    • get

      public static <T> net.minecraft.tags.TagKey<T> get(String argName, com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry)