Class Property<T extends Comparable<T>>

java.lang.Object
net.minecraft.state.property.Property<T>
Direct Known Subclasses:
BooleanProperty, EnumProperty, IntProperty

public abstract class Property<T extends Comparable<T>> extends Object
Mappings:
Namespace Name
named net/minecraft/state/property/Property
intermediary net/minecraft/class_2769
official dud
  • Field Details

    • type

      private final Class<T extends Comparable<T>> type
      Mappings:
      Namespace Name Mixin selector
      named type Lnet/minecraft/state/property/Property;type:Ljava/lang/Class;
      intermediary field_24742 Lnet/minecraft/class_2769;field_24742:Ljava/lang/Class;
      official a Ldud;a:Ljava/lang/Class;
    • name

      private final String name
      The name of this property.

      Note that the name is required to match the valid name pattern. Otherwise, IllegalArgumentException will be thrown during the validation of a property.

      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/state/property/Property;name:Ljava/lang/String;
      intermediary field_24743 Lnet/minecraft/class_2769;field_24743:Ljava/lang/String;
      official b Ldud;b:Ljava/lang/String;
    • hashCodeCache

      @Nullable private @Nullable Integer hashCodeCache
      Mappings:
      Namespace Name Mixin selector
      named hashCodeCache Lnet/minecraft/state/property/Property;hashCodeCache:Ljava/lang/Integer;
      intermediary field_24744 Lnet/minecraft/class_2769;field_24744:Ljava/lang/Integer;
      official c Ldud;c:Ljava/lang/Integer;
    • codec

      private final com.mojang.serialization.Codec<T extends Comparable<T>> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/state/property/Property;codec:Lcom/mojang/serialization/Codec;
      intermediary field_24745 Lnet/minecraft/class_2769;field_24745:Lcom/mojang/serialization/Codec;
      official d Ldud;d:Lcom/mojang/serialization/Codec;
    • valueCodec

      private final com.mojang.serialization.Codec<Property.Value<T extends Comparable<T>>> valueCodec
      Mappings:
      Namespace Name Mixin selector
      named valueCodec Lnet/minecraft/state/property/Property;valueCodec:Lcom/mojang/serialization/Codec;
      intermediary field_25670 Lnet/minecraft/class_2769;field_25670:Lcom/mojang/serialization/Codec;
      official e Ldud;e:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • Property

      protected Property(String name, Class<T> type)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/state/property/Property;<init>(Ljava/lang/String;Ljava/lang/Class;)V
      intermediary <init> Lnet/minecraft/class_2769;<init>(Ljava/lang/String;Ljava/lang/Class;)V
      official <init> Ldud;<init>(Ljava/lang/String;Ljava/lang/Class;)V
  • Method Details

    • createValue

      public Property.Value<T> createValue(T value)
      Mappings:
      Namespace Name Mixin selector
      named createValue Lnet/minecraft/state/property/Property;createValue(Ljava/lang/Comparable;)Lnet/minecraft/state/property/Property$Value;
      intermediary method_30042 Lnet/minecraft/class_2769;method_30042(Ljava/lang/Comparable;)Lnet/minecraft/class_2769$class_4933;
      official b Ldud;b(Ljava/lang/Comparable;)Ldud$a;
    • createValue

      public Property.Value<T> createValue(State<?,?> state)
      Mappings:
      Namespace Name Mixin selector
      named createValue Lnet/minecraft/state/property/Property;createValue(Lnet/minecraft/state/State;)Lnet/minecraft/state/property/Property$Value;
      intermediary method_30041 Lnet/minecraft/class_2769;method_30041(Lnet/minecraft/class_2688;)Lnet/minecraft/class_2769$class_4933;
      official a Ldud;a(Ldtc;)Ldud$a;
    • stream

      public Stream<Property.Value<T>> stream()
      Mappings:
      Namespace Name Mixin selector
      named stream Lnet/minecraft/state/property/Property;stream()Ljava/util/stream/Stream;
      intermediary method_30043 Lnet/minecraft/class_2769;method_30043()Ljava/util/stream/Stream;
      official c Ldud;c()Ljava/util/stream/Stream;
    • getCodec

      public com.mojang.serialization.Codec<T> getCodec()
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/state/property/Property;getCodec()Lcom/mojang/serialization/Codec;
      intermediary method_35308 Lnet/minecraft/class_2769;method_35308()Lcom/mojang/serialization/Codec;
      official d Ldud;d()Lcom/mojang/serialization/Codec;
    • getValueCodec

      public com.mojang.serialization.Codec<Property.Value<T>> getValueCodec()
      Mappings:
      Namespace Name Mixin selector
      named getValueCodec Lnet/minecraft/state/property/Property;getValueCodec()Lcom/mojang/serialization/Codec;
      intermediary method_30044 Lnet/minecraft/class_2769;method_30044()Lcom/mojang/serialization/Codec;
      official e Ldud;e()Lcom/mojang/serialization/Codec;
    • getName

      public String getName()
      Returns the name of this property.
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/state/property/Property;getName()Ljava/lang/String;
      intermediary method_11899 Lnet/minecraft/class_2769;method_11899()Ljava/lang/String;
      official f Ldud;f()Ljava/lang/String;
    • getType

      public Class<T> getType()
      Returns the type of the values of this property.
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/state/property/Property;getType()Ljava/lang/Class;
      intermediary method_11902 Lnet/minecraft/class_2769;method_11902()Ljava/lang/Class;
      official g Ldud;g()Ljava/lang/Class;
    • getValues

      public abstract Collection<T> getValues()
      Returns all possible values of this property.
      Mappings:
      Namespace Name Mixin selector
      named getValues Lnet/minecraft/state/property/Property;getValues()Ljava/util/Collection;
      intermediary method_11898 Lnet/minecraft/class_2769;method_11898()Ljava/util/Collection;
      official a Ldud;a()Ljava/util/Collection;
    • name

      public abstract String name(T value)
      Returns the name of the given value of this property.
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/state/property/Property;name(Ljava/lang/Comparable;)Ljava/lang/String;
      intermediary method_11901 Lnet/minecraft/class_2769;method_11901(Ljava/lang/Comparable;)Ljava/lang/String;
      official a Ldud;a(Ljava/lang/Comparable;)Ljava/lang/String;
    • parse

      public abstract Optional<T> parse(String name)
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/state/property/Property;parse(Ljava/lang/String;)Ljava/util/Optional;
      intermediary method_11900 Lnet/minecraft/class_2769;method_11900(Ljava/lang/String;)Ljava/util/Optional;
      official b Ldud;b(Ljava/lang/String;)Ljava/util/Optional;
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/state/property/Property;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2769;equals(Ljava/lang/Object;)Z
      official equals Ldud;equals(Ljava/lang/Object;)Z
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • computeHashCode

      public int computeHashCode()
      Mappings:
      Namespace Name Mixin selector
      named computeHashCode Lnet/minecraft/state/property/Property;computeHashCode()I
      intermediary method_11799 Lnet/minecraft/class_2769;method_11799()I
      official b Ldud;b()I
    • parse

      public <U, S extends State<?, S>> com.mojang.serialization.DataResult<S> parse(com.mojang.serialization.DynamicOps<U> ops, S state, U input)
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/state/property/Property;parse(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/state/State;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      intermediary method_35307 Lnet/minecraft/class_2769;method_35307(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_2688;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
      official a Ldud;a(Lcom/mojang/serialization/DynamicOps;Ldtc;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;