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:
HeightmapTypeArgument, TemplateMirrorArgument, TemplateRotationArgument

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

    • ERROR_INVALID_VALUE Link icon

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

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

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

    • StringRepresentableArgument Link icon

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

    • parse Link icon

      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 Link icon

      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 Link icon

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

      protected String convertId(String p_275436_)