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)
extends Record
-
字段概要
字段修饰符和类型字段说明private final ResourceLocation
assetId
记录组件的字段。static final com.mojang.serialization.Codec<Holder<TrimPattern>>
private final Component
description
记录组件的字段。static final com.mojang.serialization.Codec<TrimPattern>
templateItem
记录组件的字段。 -
构造器概要
构造器构造器说明TrimPattern
(ResourceLocation assetId, Holder<Item> templateItem, Component description) 创建TrimPattern
记录的实例。 -
方法概要
修饰符和类型方法说明assetId()
返回assetId
记录组件的值。copyWithStyle
(Holder<TrimMaterial> pTrimMaterial) 返回description
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。返回templateItem
记录组件的值。final String
toString()
返回此记录的字符串表示形式。
-
字段详细资料
-
assetId
assetId
记录组件的字段。 -
templateItem
templateItem
记录组件的字段。 -
description
description
记录组件的字段。 -
DIRECT_CODEC
-
CODEC
-
-
构造器详细资料
-
TrimPattern
创建TrimPattern
记录的实例。- 参数:
assetId
-assetId
记录组件的值templateItem
-templateItem
记录组件的值description
-description
记录组件的值
-
-
方法详细资料
-
copyWithStyle
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
assetId
返回assetId
记录组件的值。- 返回:
assetId
记录组件的值
-
templateItem
返回templateItem
记录组件的值。- 返回:
templateItem
记录组件的值
-
description
返回description
记录组件的值。- 返回:
description
记录组件的值
-