Record Class HasComponentProperty
java.lang.Object
java.lang.Record
net.minecraft.client.render.item.property.bool.HasComponentProperty
- Record Components:
componentType-
- All Implemented Interfaces:
BooleanProperty
@Environment(CLIENT)
public record HasComponentProperty(ComponentType<?> componentType)
extends Record
implements BooleanProperty
- Mappings:
Namespace Name named net/minecraft/client/render/item/property/bool/HasComponentPropertyintermediary net/minecraft/class_10464official hbynamed componentTypeintermediary comp_3408official b
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<HasComponentProperty> private final ComponentType<?> The field for thecomponentTyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHasComponentProperty(ComponentType<?> componentType) Creates an instance of aHasComponentPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec<HasComponentProperty> getCodec()booleangetValue(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity user, int seed) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
componentType
The field for thecomponentTyperecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/client/render/item/property/bool/HasComponentProperty;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_55376Lnet/minecraft/class_10464;field_55376:Lcom/mojang/serialization/MapCodec;official aLhby;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
HasComponentProperty
Creates an instance of aHasComponentPropertyrecord class.- Parameters:
componentType- the value for thecomponentTyperecord component
-
-
Method Details
-
getValue
public boolean getValue(ItemStack stack, @Nullable @Nullable ClientWorld world, @Nullable @Nullable LivingEntity user, int seed) - Specified by:
getValuein interfaceBooleanProperty- Mappings:
Namespace Name Mixin selector named getValueLnet/minecraft/client/render/item/property/bool/BooleanProperty;getValue(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/entity/LivingEntity;I)Zintermediary method_65638Lnet/minecraft/class_10460;method_65638(Lnet/minecraft/class_1799;Lnet/minecraft/class_638;Lnet/minecraft/class_1309;I)Zofficial aLhbu;a(Lcwp;Lgfy;Lbvg;I)Z
-
getCodec
- Specified by:
getCodecin interfaceBooleanProperty- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/client/render/item/property/bool/BooleanProperty;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_65637Lnet/minecraft/class_10460;method_65637()Lcom/mojang/serialization/MapCodec;official aLhbu;a()Lcom/mojang/serialization/MapCodec;
-
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
-