Record Class ArmorTrimPattern
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.ArmorTrimPattern
- All Implemented Interfaces:
Copyable
,Rewritable
public record ArmorTrimPattern(String assetName, int itemId, com.viaversion.nbt.tag.Tag description, boolean decal)
extends Record
implements Copyable, Rewritable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HolderType<ArmorTrimPattern>
static final HolderType<ArmorTrimPattern>
-
Constructor Summary
ConstructorsConstructorDescriptionArmorTrimPattern
(String assetName, int itemId, com.viaversion.nbt.tag.Tag description, boolean decal) Creates an instance of aArmorTrimPattern
record class.ArmorTrimPattern
(String assetName, com.viaversion.nbt.tag.Tag description, boolean decal) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassetName
record component.copy()
boolean
decal()
Returns the value of thedecal
record component.com.viaversion.nbt.tag.Tag
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.int
itemId()
Returns the value of theitemId
record component.rewrite
(UserConnection connection, Protocol<?, ?, ?, ?> protocol, boolean clientbound) Rewrites the object to a different version, may return self or a new object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE1_20_5
-
TYPE1_21_5
-
-
Constructor Details
-
ArmorTrimPattern
-
ArmorTrimPattern
public ArmorTrimPattern(String assetName, int itemId, com.viaversion.nbt.tag.Tag description, boolean decal) Creates an instance of aArmorTrimPattern
record class.- Parameters:
assetName
- the value for theassetName
record componentitemId
- the value for theitemId
record componentdescription
- the value for thedescription
record componentdecal
- the value for thedecal
record component
-
-
Method Details
-
rewrite
public ArmorTrimPattern rewrite(UserConnection connection, Protocol<?, ?, ?, ?> protocol, boolean clientbound) Description copied from interface:Rewritable
Rewrites the object to a different version, may return self or a new object.- Specified by:
rewrite
in interfaceRewritable
- Parameters:
connection
- user connectionprotocol
- protocolclientbound
- whether it should be rewritten client- or serverbound- Returns:
- rewritten object, may be (modified or unmodified) self or a new object
-
copy
-
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 '=='. -
assetName
Returns the value of theassetName
record component.- Returns:
- the value of the
assetName
record component
-
itemId
public int itemId()Returns the value of theitemId
record component.- Returns:
- the value of the
itemId
record component
-
description
public com.viaversion.nbt.tag.Tag description()Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
decal
public boolean decal()Returns the value of thedecal
record component.- Returns:
- the value of the
decal
record component
-