Class StringRepresentableArgument<T extends Enum<T> & StringRepresentable>

java.lang.Object
net.minecraft.commands.arguments.StringRepresentableArgument<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<T>
Direct Known Subclasses:
TemplateMirrorArgument, TemplateRotationArgument

public class StringRepresentableArgument<T extends Enum<T> & StringRepresentable> extends Object implements com.mojang.brigadier.arguments.ArgumentType<T>
  • Field Details

    • ERROR_INVALID_VALUE

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_INVALID_VALUE
    • codec

      private final com.mojang.serialization.Codec<T extends Enum<T> & StringRepresentable> codec
    • values

      private final Supplier<T extends Enum<T> & StringRepresentable[]> values
  • Constructor Details

    • StringRepresentableArgument

      protected StringRepresentableArgument(com.mojang.serialization.Codec<T> p_234060_, Supplier<T[]> p_234061_)
  • Method Details

    • parse

      public T parse(com.mojang.brigadier.StringReader p_234063_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T> & StringRepresentable>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_234074_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_234075_)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T> & StringRepresentable>
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T> & StringRepresentable>