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(Identifier 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 IdentifierThe field for thetextureIdrecord component.private final booleanThe field for theusePlayerTexturerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLayer(Identifier textureId) Layer(Identifier 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(Identifier textureId, boolean dyeable) static EquipmentClientInfo.LayeronlyIfDyed(Identifier 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(Identifier 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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-