Record Class ArmorTrim
java.lang.Object
java.lang.Record
net.minecraft.item.equipment.trim.ArmorTrim
- Record Components:
material-pattern-
- All Implemented Interfaces:
TooltipAppender
public record ArmorTrim(RegistryEntry<ArmorTrimMaterial> material, RegistryEntry<ArmorTrimPattern> pattern)
extends Record
implements TooltipAppender
- Mappings:
Namespace Name named net/minecraft/item/equipment/trim/ArmorTrimintermediary net/minecraft/class_8053official divnamed materialintermediary comp_3179official cnamed patternintermediary comp_3180official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ArmorTrim> private final RegistryEntry<ArmorTrimMaterial> The field for thematerialrecord component.static final PacketCodec<RegistryByteBuf, ArmorTrim> private final RegistryEntry<ArmorTrimPattern> The field for thepatternrecord component.private static final Text -
Constructor Summary
ConstructorsConstructorDescriptionArmorTrim(RegistryEntry<ArmorTrimMaterial> material, RegistryEntry<ArmorTrimPattern> pattern) Creates an instance of aArmorTrimrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) final booleanIndicates whether some other object is "equal to" this one.getTextureId(String trimsDirectory, RegistryKey<EquipmentAsset> equipmentAsset) final inthashCode()Returns a hash code value for this object.material()Returns the value of thematerialrecord component.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
material
The field for thematerialrecord component. -
pattern
The field for thepatternrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/item/equipment/trim/ArmorTrim;CODEC:Lcom/mojang/serialization/Codec;intermediary field_41994Lnet/minecraft/class_8053;field_41994:Lcom/mojang/serialization/Codec;official aLdiv;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/item/equipment/trim/ArmorTrim;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49278Lnet/minecraft/class_8053;field_49278:Lnet/minecraft/class_9139;official bLdiv;b:Lze;
-
UPGRADE_TEXT
- Mappings:
Namespace Name Mixin selector named UPGRADE_TEXTLnet/minecraft/item/equipment/trim/ArmorTrim;UPGRADE_TEXT:Lnet/minecraft/text/Text;intermediary field_41997Lnet/minecraft/class_8053;field_41997:Lnet/minecraft/class_2561;official eLdiv;e:Lxg;
-
-
Constructor Details
-
ArmorTrim
public ArmorTrim(RegistryEntry<ArmorTrimMaterial> material, RegistryEntry<ArmorTrimPattern> pattern) Creates an instance of aArmorTrimrecord class.
-
-
Method Details
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) - Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/tooltip/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;Lnet/minecraft/class_9473;)Vofficial aLddp;a(Ldag$b;Ljava/util/function/Consumer;Ldbz;Lkg;)V
-
getTextureId
- Mappings:
Namespace Name Mixin selector named getTextureIdLnet/minecraft/item/equipment/trim/ArmorTrim;getTextureId(Ljava/lang/String;Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/util/Identifier;intermediary method_67225Lnet/minecraft/class_8053;method_67225(Ljava/lang/String;Lnet/minecraft/class_5321;)Lnet/minecraft/class_2960;official aLdiv;a(Ljava/lang/String;Lalq;)Lalr;
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-