Record Class ArmorTrimMaterial
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.ArmorTrimMaterial
- All Implemented Interfaces:
Copyable,Rewritable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HolderType<ArmorTrimMaterial>static final HolderType<ArmorTrimMaterial>static final HolderType<ArmorTrimMaterial>static final HolderType<ArmorTrimMaterial> -
Constructor Summary
ConstructorsConstructorDescriptionArmorTrimMaterial(String assetName, int itemId, float itemModelIndex, Map<String, String> overrideArmorMaterials, com.viaversion.nbt.tag.Tag description) Creates an instance of aArmorTrimMaterialrecord class.ArmorTrimMaterial(String assetName, int itemId, Map<String, String> overrideArmorMaterials, com.viaversion.nbt.tag.Tag description) ArmorTrimMaterial(String assetName, Map<String, String> overrideArmorMaterials, com.viaversion.nbt.tag.Tag description) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassetNamerecord component.copy()com.viaversion.nbt.tag.TagReturns 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.intitemId()Returns the value of theitemIdrecord component.floatReturns the value of theitemModelIndexrecord component.Returns the value of theoverrideArmorMaterialsrecord component.rewrite(UserConnection connection, Protocol<?, ?, ?, ?> protocol, boolean clientbound) Rewrites the object to a different version, may return self or a new object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE1_20_5
-
TYPE1_21_2
-
TYPE1_21_4
-
TYPE1_21_5
-
-
Constructor Details
-
ArmorTrimMaterial
-
ArmorTrimMaterial
-
ArmorTrimMaterial
public ArmorTrimMaterial(String assetName, int itemId, float itemModelIndex, Map<String, String> overrideArmorMaterials, com.viaversion.nbt.tag.Tag description) Creates an instance of aArmorTrimMaterialrecord class.- Parameters:
assetName- the value for theassetNamerecord componentitemId- the value for theitemIdrecord componentitemModelIndex- the value for theitemModelIndexrecord componentoverrideArmorMaterials- the value for theoverrideArmorMaterialsrecord componentdescription- the value for thedescriptionrecord component
-
-
Method Details
-
rewrite
public ArmorTrimMaterial rewrite(UserConnection connection, Protocol<?, ?, ?, ?> protocol, boolean clientbound) Description copied from interface:RewritableRewrites the object to a different version, may return self or a new object.- Specified by:
rewritein 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 theassetNamerecord component.- Returns:
- the value of the
assetNamerecord component
-
itemId
public int itemId()Returns the value of theitemIdrecord component.- Returns:
- the value of the
itemIdrecord component
-
itemModelIndex
public float itemModelIndex()Returns the value of theitemModelIndexrecord component.- Returns:
- the value of the
itemModelIndexrecord component
-
overrideArmorMaterials
Returns the value of theoverrideArmorMaterialsrecord component.- Returns:
- the value of the
overrideArmorMaterialsrecord component
-
description
public com.viaversion.nbt.tag.Tag description()Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-