Class EnumArgumentType<T extends Enum<T> & StringIdentifiable>

java.lang.Object
net.minecraft.command.argument.EnumArgumentType<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<T>
Direct Known Subclasses:
BlockMirrorArgumentType, BlockRotationArgumentType, HeightmapArgumentType

public class EnumArgumentType<T extends Enum<T> & StringIdentifiable> extends Object implements com.mojang.brigadier.arguments.ArgumentType<T>
Mappings:
Namespace Name
official ez
intermediary net/minecraft/class_7485
named net/minecraft/command/argument/EnumArgumentType
  • Field Details

    • INVALID_ENUM_EXCEPTION

      private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType INVALID_ENUM_EXCEPTION
      Mappings:
      Namespace Name Mixin selector
      official a Lez;a:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      intermediary field_39361 Lnet/minecraft/class_7485;field_39361:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
      named INVALID_ENUM_EXCEPTION Lnet/minecraft/command/argument/EnumArgumentType;INVALID_ENUM_EXCEPTION:Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;
    • codec

      private final com.mojang.serialization.Codec<T extends Enum<T> & StringIdentifiable> codec
      Mappings:
      Namespace Name Mixin selector
      official b Lez;b:Lcom/mojang/serialization/Codec;
      intermediary field_39362 Lnet/minecraft/class_7485;field_39362:Lcom/mojang/serialization/Codec;
      named codec Lnet/minecraft/command/argument/EnumArgumentType;codec:Lcom/mojang/serialization/Codec;
    • valuesSupplier

      private final Supplier<T extends Enum<T> & StringIdentifiable[]> valuesSupplier
      Mappings:
      Namespace Name Mixin selector
      official c Lez;c:Ljava/util/function/Supplier;
      intermediary field_39363 Lnet/minecraft/class_7485;field_39363:Ljava/util/function/Supplier;
      named valuesSupplier Lnet/minecraft/command/argument/EnumArgumentType;valuesSupplier:Ljava/util/function/Supplier;
  • Constructor Details

    • EnumArgumentType

      protected EnumArgumentType(com.mojang.serialization.Codec<T> codec, Supplier<T[]> valuesSupplier)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lez;<init>(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)V
      intermediary <init> Lnet/minecraft/class_7485;<init>(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)V
      named <init> Lnet/minecraft/command/argument/EnumArgumentType;<init>(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)V
  • Method Details

    • parse

      public T parse(com.mojang.brigadier.StringReader stringReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T> & StringIdentifiable>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      official a Lez;a(Lcom/mojang/brigadier/StringReader;)Ljava/lang/Enum;
      intermediary method_44091 Lnet/minecraft/class_7485;method_44091(Lcom/mojang/brigadier/StringReader;)Ljava/lang/Enum;
      named parse Lnet/minecraft/command/argument/EnumArgumentType;parse(Lcom/mojang/brigadier/StringReader;)Ljava/lang/Enum;
    • 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 extends Enum<T> & StringIdentifiable>
      Mappings:
      Namespace Name Mixin selector
      official listSuggestions Lez;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      intermediary listSuggestions Lnet/minecraft/class_7485;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      named listSuggestions Lnet/minecraft/command/argument/EnumArgumentType;listSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
    • getExamples

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

      protected String transformValueName(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Lez;a(Ljava/lang/String;)Ljava/lang/String;
      intermediary method_49545 Lnet/minecraft/class_7485;method_49545(Ljava/lang/String;)Ljava/lang/String;
      named transformValueName Lnet/minecraft/command/argument/EnumArgumentType;transformValueName(Ljava/lang/String;)Ljava/lang/String;