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, boolean decal)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ResourceLocationThe field for theassetIdrecord component.static final com.mojang.serialization.Codec<Holder<TrimPattern>>private final booleanThe field for thedecalrecord component.private final ComponentThe field for thedescriptionrecord component.static final com.mojang.serialization.Codec<TrimPattern>The field for thetemplateItemrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionTrimPattern(ResourceLocation assetId, Holder<Item> templateItem, Component description, boolean decal) Creates an instance of aTrimPatternrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionassetId()Returns the value of theassetIdrecord component.copyWithStyle(Holder<TrimMaterial> p_266827_) booleandecal()Returns the value of thedecalrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetemplateItemrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
assetIdThe field for theassetIdrecord component.
- 
templateItemThe field for thetemplateItemrecord component.
- 
descriptionThe field for thedescriptionrecord component.
- 
decalprivate final boolean decalThe field for thedecalrecord component.
- 
DIRECT_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
TrimPatternpublic TrimPattern(ResourceLocation assetId, Holder<Item> templateItem, Component description, boolean decal) Creates an instance of aTrimPatternrecord class.- Parameters:
- assetId- the value for the- assetIdrecord component
- templateItem- the value for the- templateItemrecord component
- description- the value for the- descriptionrecord component
- decal- the value for the- decalrecord component
 
 
- 
- 
Method Details- 
copyWithStyle
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
assetIdReturns the value of theassetIdrecord component.- Returns:
- the value of the assetIdrecord component
 
- 
templateItemReturns the value of thetemplateItemrecord component.- Returns:
- the value of the templateItemrecord component
 
- 
descriptionReturns the value of thedescriptionrecord component.- Returns:
- the value of the descriptionrecord component
 
- 
decalpublic boolean decal()Returns the value of thedecalrecord component.- Returns:
- the value of the decalrecord component
 
 
-