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 thedyeable
record component.private final ResourceLocation
The field for thetextureId
record component.private final boolean
The field for theusePlayerTexture
record component. -
Constructor Summary
ConstructorsConstructorDescriptionLayer
(ResourceLocation p_386866_) Layer
(ResourceLocation textureId, Optional<EquipmentClientInfo.Dyeable> dyeable, boolean usePlayerTexture) Creates an instance of aLayer
record class. -
Method Summary
Modifier and TypeMethodDescriptiondyeable()
Returns the value of thedyeable
record component.final boolean
Indicates whether some other object is "equal to" this one.getTextureLocation
(EquipmentClientInfo.LayerType p_386578_) final int
hashCode()
Returns a hash code value for this object.static EquipmentClientInfo.Layer
leatherDyeable
(ResourceLocation p_388888_, boolean p_388540_) static EquipmentClientInfo.Layer
onlyIfDyed
(ResourceLocation p_388030_, boolean p_386457_) Returns the value of thetextureId
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theusePlayerTexture
record component.
-
Field Details
-
textureId
The field for thetextureId
record component. -
dyeable
The field for thedyeable
record component. -
usePlayerTexture
private final boolean usePlayerTextureThe field for theusePlayerTexture
record component. -
CODEC
-
-
Constructor Details
-
Layer
-
Layer
public Layer(ResourceLocation textureId, Optional<EquipmentClientInfo.Dyeable> dyeable, boolean usePlayerTexture) Creates an instance of aLayer
record class.- Parameters:
textureId
- the value for thetextureId
record componentdyeable
- the value for thedyeable
record componentusePlayerTexture
- the value for theusePlayerTexture
record component
-
-
Method Details
-
leatherDyeable
public static EquipmentClientInfo.Layer leatherDyeable(ResourceLocation p_388888_, boolean p_388540_) -
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 thetextureId
record component.- Returns:
- the value of the
textureId
record component
-
dyeable
Returns the value of thedyeable
record component.- Returns:
- the value of the
dyeable
record component
-
usePlayerTexture
public boolean usePlayerTexture()Returns the value of theusePlayerTexture
record component.- Returns:
- the value of the
usePlayerTexture
record component
-