Record Class TrimPattern
java.lang.Object
java.lang.Record
net.minecraft.world.item.armortrim.TrimPattern
public record TrimPattern(ResourceLocation assetId, Holder<Item> templateItem, Component description)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
The field for theassetId
record component.static final com.mojang.serialization.Codec<Holder<TrimPattern>>
private final Component
The field for thedescription
record component.static final com.mojang.serialization.Codec<TrimPattern>
The field for thetemplateItem
record component. -
Constructor Summary
ConstructorDescriptionTrimPattern
(ResourceLocation assetId, Holder<Item> templateItem, Component description) Creates an instance of aTrimPattern
record class. -
Method Summary
Modifier and TypeMethodDescriptionassetId()
Returns the value of theassetId
record component.copyWithStyle
(Holder<TrimMaterial> p_266827_) Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thetemplateItem
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
assetId
The field for theassetId
record component. -
templateItem
The field for thetemplateItem
record component. -
description
The field for thedescription
record component. -
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
TrimPattern
Creates an instance of aTrimPattern
record class.- Parameters:
assetId
- the value for theassetId
record componenttemplateItem
- the value for thetemplateItem
record componentdescription
- the value for thedescription
record component
-
-
Method Details
-
copyWithStyle
-
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)
. -
assetId
Returns the value of theassetId
record component.- Returns:
- the value of the
assetId
record component
-
templateItem
Returns the value of thetemplateItem
record component.- Returns:
- the value of the
templateItem
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-