Record Class HasComponentProperty
java.lang.Object
java.lang.Record
net.minecraft.client.render.item.property.bool.HasComponentProperty
- Record Components:
componentType-ignoreDefault-
- All Implemented Interfaces:
BooleanProperty,PropertyTester
@Environment(CLIENT)
public record HasComponentProperty(ComponentType<?> componentType, boolean ignoreDefault)
extends Record
implements BooleanProperty
- Mappings:
Namespace Name named net/minecraft/client/render/item/property/bool/HasComponentPropertyintermediary net/minecraft/class_10464official hhynamed componentTypeintermediary comp_3408official bnamed ignoreDefaultintermediary comp_3438official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<HasComponentProperty> private final ComponentType<?> The field for thecomponentTyperecord component.private final booleanThe field for theignoreDefaultrecord component. -
Constructor Summary
Constructors -
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()final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreDefaultrecord component.booleantest(ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity, int seed, ItemDisplayContext displayContext) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
componentType
The field for thecomponentTyperecord component. -
ignoreDefault
private final boolean ignoreDefaultThe field for theignoreDefaultrecord 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 aLhhy;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
HasComponentProperty
-
-
Method Details
-
test
public boolean test(ItemStack stack, @Nullable @Nullable ClientWorld world, @Nullable @Nullable LivingEntity entity, int seed, ItemDisplayContext displayContext) - Specified by:
testin interfacePropertyTester- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/client/render/item/property/PropertyTester;test(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/entity/LivingEntity;ILnet/minecraft/item/ItemDisplayContext;)Zintermediary method_65638Lnet/minecraft/class_10724;method_65638(Lnet/minecraft/class_1799;Lnet/minecraft/class_638;Lnet/minecraft/class_1309;ILnet/minecraft/class_811;)Zofficial getLhie;get(Ldak;Lglo;Lbyf;ILdai;)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 aLhht;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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-
ignoreDefault
public boolean ignoreDefault()Returns the value of theignoreDefaultrecord component.- Returns:
- the value of the
ignoreDefaultrecord component
-