Record Class AttributeModifiersComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.AttributeModifiersComponent
Record Components:
modifiers -
showInTooltip -

public record AttributeModifiersComponent(List<AttributeModifiersComponent.Entry> modifiers, boolean showInTooltip) extends Record
Mappings:
Namespace Name
official cvs
intermediary net/minecraft/class_9285
named net/minecraft/component/type/AttributeModifiersComponent
official e
intermediary comp_2393
named modifiers
official f
intermediary comp_2394
named showInTooltip
  • Field Details

    • modifiers

      private final List<AttributeModifiersComponent.Entry> modifiers
      The field for the modifiers record component.
    • showInTooltip

      private final boolean showInTooltip
      The field for the showInTooltip record component.
    • DEFAULT

      public static final AttributeModifiersComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a:Lcvs;
      intermediary field_49326 Lnet/minecraft/class_9285;field_49326:Lnet/minecraft/class_9285;
      named DEFAULT Lnet/minecraft/component/type/AttributeModifiersComponent;DEFAULT:Lnet/minecraft/component/type/AttributeModifiersComponent;
    • BASE_CODEC

      private static final com.mojang.serialization.Codec<AttributeModifiersComponent> BASE_CODEC
      Mappings:
      Namespace Name Mixin selector
      official g Lcvs;g:Lcom/mojang/serialization/Codec;
      intermediary field_49751 Lnet/minecraft/class_9285;field_49751:Lcom/mojang/serialization/Codec;
      named BASE_CODEC Lnet/minecraft/component/type/AttributeModifiersComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<AttributeModifiersComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      official b Lcvs;b:Lcom/mojang/serialization/Codec;
      intermediary field_49327 Lnet/minecraft/class_9285;field_49327:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/component/type/AttributeModifiersComponent;CODEC:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,AttributeModifiersComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      official c Lcvs;c:Lys;
      intermediary field_49328 Lnet/minecraft/class_9285;field_49328:Lnet/minecraft/class_9139;
      named PACKET_CODEC Lnet/minecraft/component/type/AttributeModifiersComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
    • DECIMAL_FORMAT

      public static final DecimalFormat DECIMAL_FORMAT
      Mappings:
      Namespace Name Mixin selector
      official d Lcvs;d:Ljava/text/DecimalFormat;
      intermediary field_49329 Lnet/minecraft/class_9285;field_49329:Ljava/text/DecimalFormat;
      named DECIMAL_FORMAT Lnet/minecraft/component/type/AttributeModifiersComponent;DECIMAL_FORMAT:Ljava/text/DecimalFormat;
  • Constructor Details

  • Method Details

    • withShowInTooltip

      public AttributeModifiersComponent withShowInTooltip(boolean showInTooltip)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a(Z)Lcvs;
      intermediary method_58423 Lnet/minecraft/class_9285;method_58423(Z)Lnet/minecraft/class_9285;
      named withShowInTooltip Lnet/minecraft/component/type/AttributeModifiersComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/AttributeModifiersComponent;
    • builder

      public static AttributeModifiersComponent.Builder builder()
      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a()Lcvs$a;
      intermediary method_57480 Lnet/minecraft/class_9285;method_57480()Lnet/minecraft/class_9285$class_9286;
      named builder Lnet/minecraft/component/type/AttributeModifiersComponent;builder()Lnet/minecraft/component/type/AttributeModifiersComponent$Builder;
    • with

      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a(Liw;Lbtf;Lbrp;)Lcvs;
      intermediary method_57484 Lnet/minecraft/class_9285;method_57484(Lnet/minecraft/class_6880;Lnet/minecraft/class_1322;Lnet/minecraft/class_9274;)Lnet/minecraft/class_9285;
      named with Lnet/minecraft/component/type/AttributeModifiersComponent;with(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/attribute/EntityAttributeModifier;Lnet/minecraft/component/type/AttributeModifierSlot;)Lnet/minecraft/component/type/AttributeModifiersComponent;
    • applyModifiers

      public void applyModifiers(EquipmentSlot slot, BiConsumer<RegistryEntry<EntityAttribute>,EntityAttributeModifier> attributeConsumer)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a(Lbro;Ljava/util/function/BiConsumer;)V
      intermediary method_57482 Lnet/minecraft/class_9285;method_57482(Lnet/minecraft/class_1304;Ljava/util/function/BiConsumer;)V
      named applyModifiers Lnet/minecraft/component/type/AttributeModifiersComponent;applyModifiers(Lnet/minecraft/entity/EquipmentSlot;Ljava/util/function/BiConsumer;)V
    • applyOperations

      public double applyOperations(double base, EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      official a Lcvs;a(DLbro;)D
      intermediary method_57481 Lnet/minecraft/class_9285;method_57481(DLnet/minecraft/class_1304;)D
      named applyOperations Lnet/minecraft/component/type/AttributeModifiersComponent;applyOperations(DLnet/minecraft/entity/EquipmentSlot;)D
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • modifiers

      Returns the value of the modifiers record component.
      Returns:
      the value of the modifiers record component
    • showInTooltip

      public boolean showInTooltip()
      Returns the value of the showInTooltip record component.
      Returns:
      the value of the showInTooltip record component