Record Class ComponentProperty<T>
java.lang.Object
java.lang.Record
net.minecraft.client.render.item.property.select.ComponentProperty<T>
- Record Components:
componentType-
- All Implemented Interfaces:
SelectProperty<T>
@Environment(CLIENT)
public record ComponentProperty<T>(ComponentType<T> componentType)
extends Record
implements SelectProperty<T>
- Mappings:
Namespace Name named net/minecraft/client/render/item/property/select/ComponentPropertyintermediary net/minecraft/class_10653official hggnamed componentTypeintermediary comp_3532official a
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.render.item.property.select.SelectProperty
SelectProperty.Type<P extends SelectProperty<T>,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentType<T> The field for thecomponentTyperecord component.private static final SelectProperty.Type<? extends ComponentProperty<?>, ?> -
Constructor Summary
ConstructorsConstructorDescriptionComponentProperty(ComponentType<T> componentType) Creates an instance of aComponentPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentTyperecord component.private static <T> SelectProperty.Type<ComponentProperty<T>, T> final booleanIndicates whether some other object is "equal to" this one.getType()static <T> SelectProperty.Type<ComponentProperty<T>, T> getValue(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity user, int seed, ModelTransformationMode modelTransformationMode) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.Codec<T>
-
Field Details
-
componentType
The field for thecomponentTyperecord component. -
TYPE
- Mappings:
Namespace Name Mixin selector named TYPELnet/minecraft/client/render/item/property/select/ComponentProperty;TYPE:Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;intermediary field_56122Lnet/minecraft/class_10653;field_56122:Lnet/minecraft/class_10494$class_10495;official bLhgg;b:Lhgp$a;
-
-
Constructor Details
-
ComponentProperty
Creates an instance of aComponentPropertyrecord class.- Parameters:
componentType- the value for thecomponentTyperecord component
-
-
Method Details
-
createType
- Mappings:
Namespace Name Mixin selector named createTypeLnet/minecraft/client/render/item/property/select/ComponentProperty;createType()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;intermediary method_66864Lnet/minecraft/class_10653;method_66864()Lnet/minecraft/class_10494$class_10495;official eLhgg;e()Lhgp$a;
-
getTypeInstance
- Mappings:
Namespace Name Mixin selector named getTypeInstanceLnet/minecraft/client/render/item/property/select/ComponentProperty;getTypeInstance()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;intermediary method_66862Lnet/minecraft/class_10653;method_66862()Lnet/minecraft/class_10494$class_10495;official cLhgg;c()Lhgp$a;
-
getValue
@Nullable public T getValue(ItemStack stack, @Nullable @Nullable ClientWorld world, @Nullable @Nullable LivingEntity user, int seed, ModelTransformationMode modelTransformationMode) - Specified by:
getValuein interfaceSelectProperty<T>- Mappings:
Namespace Name Mixin selector named getValueLnet/minecraft/client/render/item/property/select/SelectProperty;getValue(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/item/ModelTransformationMode;)Ljava/lang/Object;intermediary method_65676Lnet/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 bLhgp;b(Lcys;Lgjd;Lbwz;ILcyq;)Ljava/lang/Object;
-
getType
- Specified by:
getTypein interfaceSelectProperty<T>- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/client/render/item/property/select/SelectProperty;getType()Lnet/minecraft/client/render/item/property/select/SelectProperty$Type;intermediary method_65674Lnet/minecraft/class_10494;method_65674()Lnet/minecraft/class_10494$class_10495;official aLhgp;a()Lhgp$a;
-
valueCodec
- Specified by:
valueCodecin interfaceSelectProperty<T>- Mappings:
Namespace Name Mixin selector named valueCodecLnet/minecraft/client/render/item/property/select/SelectProperty;valueCodec()Lcom/mojang/serialization/Codec;intermediary method_67287Lnet/minecraft/class_10494;method_67287()Lcom/mojang/serialization/Codec;official bLhgp;b()Lcom/mojang/serialization/Codec;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-