Class TagKeyArgument<T>

java.lang.Object
net.frozenblock.lib.tag.api.TagKeyArgument<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>>

public class TagKeyArgument<T> extends Object implements com.mojang.brigadier.arguments.ArgumentType<net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TagKeyArgument(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static <T> net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>
    getTagKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argument, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, com.mojang.brigadier.exceptions.DynamicCommandExceptionType dynamicCommandExceptionType)
     
    <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
    listSuggestions(com.mojang.brigadier.context.CommandContext<S> commandContext, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
     
    net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>
    parse(com.mojang.brigadier.StringReader reader)
     
    static <T> TagKeyArgument<T>
    tagKey(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TagKeyArgument

      public TagKeyArgument(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
  • Method Details

    • tagKey

      public static <T> TagKeyArgument<T> tagKey(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
    • getTagKey

      public static <T> net.frozenblock.lib.tag.api.TagKeyArgument.Result<T> getTagKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argument, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, com.mojang.brigadier.exceptions.DynamicCommandExceptionType dynamicCommandExceptionType) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parse

      public net.frozenblock.lib.tag.api.TagKeyArgument.Result<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> commandContext, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
      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>