Record Class ComponentSelectProperty<T>

java.lang.Object
java.lang.Record
net.minecraft.client.render.item.property.select.ComponentSelectProperty<T>
Record Components:
componentType -
All Implemented Interfaces:
SelectProperty<T>

@Environment(CLIENT) public record ComponentSelectProperty<T>(ComponentType<T> componentType) extends Record implements SelectProperty<T>
Mappings:
Namespace Name
named net/minecraft/client/render/item/property/select/ComponentSelectProperty
intermediary net/minecraft/class_10653
official hpw
named componentType
intermediary comp_3532
official a
  • Field Details

    • componentType

      private final ComponentType<T> componentType
      The field for the componentType record component.
    • TYPE

      private static final SelectProperty.Type<? extends ComponentSelectProperty<?>,?> TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/client/render/item/property/select/ComponentSelectProperty;TYPE:Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;
      intermediary field_56122 Lnet/minecraft/class_10653;field_56122:Lnet/minecraft/class_10494$class_10495;
      official b Lhpw;b:Lhqf$a;
  • Constructor Details

    • ComponentSelectProperty

      public ComponentSelectProperty(ComponentType<T> componentType)
      Creates an instance of a ComponentSelectProperty record class.
      Parameters:
      componentType - the value for the componentType record component
  • Method Details

    • createType

      private static <T> SelectProperty.Type<ComponentSelectProperty<T>,T> createType()
      Mappings:
      Namespace Name Mixin selector
      named createType Lnet/minecraft/client/render/item/property/select/ComponentSelectProperty;createType()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;
      intermediary method_66864 Lnet/minecraft/class_10653;method_66864()Lnet/minecraft/class_10494$class_10495;
      official e Lhpw;e()Lhqf$a;
    • getTypeInstance

      public static <T> SelectProperty.Type<ComponentSelectProperty<T>,T> getTypeInstance()
      Mappings:
      Namespace Name Mixin selector
      named getTypeInstance Lnet/minecraft/client/render/item/property/select/ComponentSelectProperty;getTypeInstance()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;
      intermediary method_66862 Lnet/minecraft/class_10653;method_66862()Lnet/minecraft/class_10494$class_10495;
      official c Lhpw;c()Lhqf$a;
    • getValue

      @Nullable public T getValue(ItemStack stack, @Nullable @Nullable ClientWorld world, @Nullable @Nullable LivingEntity user, int seed, ItemDisplayContext displayContext)
      Specified by:
      getValue in interface SelectProperty<T>
      Mappings:
      Namespace Name Mixin selector
      named getValue Lnet/minecraft/client/render/item/property/select/SelectProperty;getValue(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/item/ItemDisplayContext;)Ljava/lang/Object;
      intermediary method_65676 Lnet/minecraft/class_10494;method_65676(Lnet/minecraft/class_1799;Lnet/minecraft/class_638;Lnet/minecraft/class_1309;ILnet/minecraft/class_811;)Ljava/lang/Object;
      official b Lhqf;b(Ldcv;Lgrj;Lcam;ILdct;)Ljava/lang/Object;
    • getType

      Specified by:
      getType in interface SelectProperty<T>
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/client/render/item/property/select/SelectProperty;getType()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;
      intermediary method_65674 Lnet/minecraft/class_10494;method_65674()Lnet/minecraft/class_10494$class_10495;
      official a Lhqf;a()Lhqf$a;
    • valueCodec

      public com.mojang.serialization.Codec<T> valueCodec()
      Specified by:
      valueCodec in interface SelectProperty<T>
      Mappings:
      Namespace Name Mixin selector
      named valueCodec Lnet/minecraft/client/render/item/property/select/SelectProperty;valueCodec()Lcom/mojang/serialization/Codec;
      intermediary method_67287 Lnet/minecraft/class_10494;method_67287()Lcom/mojang/serialization/Codec;
      official b Lhqf;b()Lcom/mojang/serialization/Codec;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • componentType

      public ComponentType<T> componentType()
      Returns the value of the componentType record component.
      Returns:
      the value of the componentType record component