Record Class TrimPattern
java.lang.Object
java.lang.Record
net.minecraft.world.item.equipment.trim.TrimPattern
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe 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> static final StreamCodec<RegistryFriendlyByteBuf, TrimPattern> static final StreamCodec<RegistryFriendlyByteBuf, Holder<TrimPattern>> -
Constructor Summary
ConstructorsConstructorDescriptionTrimPattern(Identifier assetId, Component description, boolean decal) Creates an instance of aTrimPatternrecord class. -
Method Summary
Modifier and TypeMethodDescriptionassetId()Returns the value of theassetIdrecord component.copyWithStyle(Holder<TrimMaterial> material) 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.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
assetId
The field for theassetIdrecord component. -
description
The field for thedescriptionrecord component. -
decal
private final boolean decalThe field for thedecalrecord component. -
DIRECT_CODEC
-
DIRECT_STREAM_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
TrimPattern
Creates an instance of aTrimPatternrecord class.- Parameters:
assetId- the value for theassetIdrecord componentdescription- the value for thedescriptionrecord componentdecal- the value for thedecalrecord component
-
-
Method Details
-
copyWithStyle
-
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. -
assetId
Returns the value of theassetIdrecord component.- Returns:
- the value of the
assetIdrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
decal
public boolean decal()Returns the value of thedecalrecord component.- Returns:
- the value of the
decalrecord component
-