Record Class EquipmentClientInfo.Layer
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.EquipmentClientInfo.Layer
- Enclosing class:
EquipmentClientInfo
public static record EquipmentClientInfo.Layer(ResourceLocation textureId, Optional<EquipmentClientInfo.Dyeable> dyeable, boolean usePlayerTexture)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EquipmentClientInfo.Layer> private final Optional<EquipmentClientInfo.Dyeable> The field for thedyeablerecord component.private final ResourceLocationThe field for thetextureIdrecord component.private final booleanThe field for theusePlayerTexturerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLayer(ResourceLocation p_386866_) Layer(ResourceLocation textureId, Optional<EquipmentClientInfo.Dyeable> dyeable, boolean usePlayerTexture) Creates an instance of aLayerrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondyeable()Returns the value of thedyeablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static EquipmentClientInfo.LayerleatherDyeable(ResourceLocation textureId, boolean dyeable) static EquipmentClientInfo.LayeronlyIfDyed(ResourceLocation textureId, boolean dyeable) Returns the value of thetextureIdrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theusePlayerTexturerecord component.
-
Field Details
-
textureId
The field for thetextureIdrecord component. -
dyeable
The field for thedyeablerecord component. -
usePlayerTexture
private final boolean usePlayerTextureThe field for theusePlayerTexturerecord component. -
CODEC
-
-
Constructor Details
-
Layer
-
Layer
public Layer(ResourceLocation textureId, Optional<EquipmentClientInfo.Dyeable> dyeable, boolean usePlayerTexture) Creates an instance of aLayerrecord class.- Parameters:
textureId- the value for thetextureIdrecord componentdyeable- the value for thedyeablerecord componentusePlayerTexture- the value for theusePlayerTexturerecord component
-
-
Method Details
-
leatherDyeable
-
onlyIfDyed
-
getTextureLocation
-
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 '=='. -
textureId
Returns the value of thetextureIdrecord component.- Returns:
- the value of the
textureIdrecord component
-
dyeable
Returns the value of thedyeablerecord component.- Returns:
- the value of the
dyeablerecord component
-
usePlayerTexture
public boolean usePlayerTexture()Returns the value of theusePlayerTexturerecord component.- Returns:
- the value of the
usePlayerTexturerecord component
-