Record Class TrimMaterial
java.lang.Object
java.lang.Record
net.minecraft.world.item.armortrim.TrimMaterial
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for theassetNamerecord component.static final com.mojang.serialization.Codec<Holder<TrimMaterial>>private final ComponentThe field for thedescriptionrecord component.static final com.mojang.serialization.Codec<TrimMaterial>The field for theingredientrecord component.private final floatThe field for theitemModelIndexrecord component.private final Map<ArmorMaterials,String> The field for theoverrideArmorMaterialsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionTrimMaterial(String assetName, Holder<Item> ingredient, float itemModelIndex, Map<ArmorMaterials, String> overrideArmorMaterials, Component description) Creates an instance of aTrimMaterialrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theassetNamerecord component.static TrimMaterialcreate(String p_268108_, Item p_268361_, float p_268202_, Component p_268273_, Map<ArmorMaterials, String> p_267977_) 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 theingredientrecord component.floatReturns the value of theitemModelIndexrecord component.Returns the value of theoverrideArmorMaterialsrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
assetNameThe field for theassetNamerecord component.
- 
ingredientThe field for theingredientrecord component.
- 
itemModelIndexprivate final float itemModelIndexThe field for theitemModelIndexrecord component.
- 
overrideArmorMaterialsThe field for theoverrideArmorMaterialsrecord component.
- 
descriptionThe field for thedescriptionrecord component.
- 
DIRECT_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
TrimMaterialpublic TrimMaterial(String assetName, Holder<Item> ingredient, float itemModelIndex, Map<ArmorMaterials, String> overrideArmorMaterials, Component description) Creates an instance of aTrimMaterialrecord class.- Parameters:
- assetName- the value for the- assetNamerecord component
- ingredient- the value for the- ingredientrecord component
- itemModelIndex- the value for the- itemModelIndexrecord component
- overrideArmorMaterials- the value for the- overrideArmorMaterialsrecord component
- description- the value for the- descriptionrecord component
 
 
- 
- 
Method Details- 
createpublic static TrimMaterial create(String p_268108_, Item p_268361_, float p_268202_, Component p_268273_, Map<ArmorMaterials, String> p_267977_) 
- 
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 '=='.
- 
assetNameReturns the value of theassetNamerecord component.- Returns:
- the value of the assetNamerecord component
 
- 
ingredientReturns the value of theingredientrecord component.- Returns:
- the value of the ingredientrecord component
 
- 
itemModelIndexpublic float itemModelIndex()Returns the value of theitemModelIndexrecord component.- Returns:
- the value of the itemModelIndexrecord component
 
- 
overrideArmorMaterialsReturns the value of theoverrideArmorMaterialsrecord component.- Returns:
- the value of the overrideArmorMaterialsrecord component
 
- 
descriptionReturns the value of thedescriptionrecord component.- Returns:
- the value of the descriptionrecord component
 
 
-