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

java.lang.Object
net.minecraft.state.property.AbstractProperty<T>
net.minecraft.state.property.EnumProperty<T>
All Implemented Interfaces:
Property<T>
Direct Known Subclasses:
DirectionProperty

public class EnumProperty<T extends Enum<T> & StringIdentifiable> extends AbstractProperty<T>
Mappings:
Namespace Name
official bmh
intermediary net/minecraft/class_2245
named net/minecraft/state/property/EnumProperty
  • Field Details

    • values

      private final ImmutableSet<T extends Enum<T> & StringIdentifiable> values
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a:Lcom/google/common/collect/ImmutableSet;
      intermediary field_9925 Lnet/minecraft/class_2245;field_9925:Lcom/google/common/collect/ImmutableSet;
      named values Lnet/minecraft/state/property/EnumProperty;values:Lcom/google/common/collect/ImmutableSet;
    • byName

      private final Map<String,T extends Enum<T> & StringIdentifiable> byName
      Mappings:
      Namespace Name Mixin selector
      official b Lbmh;b:Ljava/util/Map;
      intermediary field_9926 Lnet/minecraft/class_2245;field_9926:Ljava/util/Map;
      named byName Lnet/minecraft/state/property/EnumProperty;byName:Ljava/util/Map;
  • Constructor Details

    • EnumProperty

      protected EnumProperty(String name, Class<T> clazz, Collection<T> values)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbmh;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
      intermediary <init> Lnet/minecraft/class_2245;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
      named <init> Lnet/minecraft/state/property/EnumProperty;<init>(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)V
  • Method Details

    • getValues

      public Collection<T> getValues()
      Mappings:
      Namespace Name Mixin selector
      official d Lbmm;d()Ljava/util/Collection;
      intermediary method_9082 Lnet/minecraft/class_2247;method_9082()Ljava/util/Collection;
      named getValues Lnet/minecraft/state/property/Property;getValues()Ljava/util/Collection;
    • getValueAsString

      public Optional<T> getValueAsString(String value)
      Mappings:
      Namespace Name Mixin selector
      official b Lbmm;b(Ljava/lang/String;)Ljava/util/Optional;
      intermediary method_16973 Lnet/minecraft/class_2247;method_16973(Ljava/lang/String;)Ljava/util/Optional;
      named getValueAsString Lnet/minecraft/state/property/Property;getValueAsString(Ljava/lang/String;)Ljava/util/Optional;
    • name

      public String name(T t)
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a(Ljava/lang/Enum;)Ljava/lang/String;
      intermediary method_9072 Lnet/minecraft/class_2245;method_9072(Ljava/lang/Enum;)Ljava/lang/String;
      named name Lnet/minecraft/state/property/EnumProperty;name(Ljava/lang/Enum;)Ljava/lang/String;
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractProperty<T extends Enum<T> & StringIdentifiable>
      Mappings:
      Namespace Name Mixin selector
      official equals Lblx;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2242;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/state/property/AbstractProperty;equals(Ljava/lang/Object;)Z
    • computeHashCode

      public int computeHashCode()
      Overrides:
      computeHashCode in class AbstractProperty<T extends Enum<T> & StringIdentifiable>
      Mappings:
      Namespace Name Mixin selector
      official c Lblx;c()I
      intermediary method_16962 Lnet/minecraft/class_2242;method_16962()I
      named computeHashCode Lnet/minecraft/state/property/AbstractProperty;computeHashCode()I
    • of

      public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type)
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a(Ljava/lang/String;Ljava/lang/Class;)Lbmh;
      intermediary method_9073 Lnet/minecraft/class_2245;method_9073(Ljava/lang/String;Ljava/lang/Class;)Lnet/minecraft/class_2245;
      named of Lnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;)Lnet/minecraft/state/property/EnumProperty;
    • method_16970

      public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> method_16970(String string, Class<T> class2, Predicate<T> predicate)
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lbmh;
      intermediary method_16970 Lnet/minecraft/class_2245;method_16970(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lnet/minecraft/class_2245;
      named method_16970 Lnet/minecraft/state/property/EnumProperty;method_16970(Ljava/lang/String;Ljava/lang/Class;Ljava/util/function/Predicate;)Lnet/minecraft/state/property/EnumProperty;
    • of

      public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type, T[] values)
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lbmh;
      intermediary method_9076 Lnet/minecraft/class_2245;method_9076(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lnet/minecraft/class_2245;
      named of Lnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Enum;)Lnet/minecraft/state/property/EnumProperty;
    • of

      public static <T extends Enum<T> & StringIdentifiable> EnumProperty<T> of(String name, Class<T> type, Collection<T> values)
      Mappings:
      Namespace Name Mixin selector
      official a Lbmh;a(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lbmh;
      intermediary method_9075 Lnet/minecraft/class_2245;method_9075(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/class_2245;
      named of Lnet/minecraft/state/property/EnumProperty;of(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Collection;)Lnet/minecraft/state/property/EnumProperty;