Record Class SetAttributesLootFunction.Attribute

java.lang.Object
java.lang.Record
net.minecraft.loot.function.SetAttributesLootFunction.Attribute
Record Components:
name -
attribute -
operation -
amount -
slots -
id -
Enclosing class:
SetAttributesLootFunction

private static record SetAttributesLootFunction.Attribute(String name, RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier.Operation operation, LootNumberProvider amount, List<EquipmentSlot> slots, Optional<UUID> id) extends Record
Mappings:
Namespace Name
official eio$b
intermediary net/minecraft/class_137$class_138
named net/minecraft/loot/function/SetAttributesLootFunction$Attribute
official b
intermediary comp_1859
named name
official c
intermediary comp_1860
named attribute
official d
intermediary comp_1861
named operation
official e
intermediary comp_1862
named amount
official f
intermediary comp_1863
named slots
official g
intermediary comp_1864
named id
  • Field Details

    • name

      private final String name
      The field for the name record component.
    • attribute

      private final RegistryEntry<EntityAttribute> attribute
      The field for the attribute record component.
    • operation

      private final EntityAttributeModifier.Operation operation
      The field for the operation record component.
    • amount

      private final LootNumberProvider amount
      The field for the amount record component.
    • slots

      private final List<EquipmentSlot> slots
      The field for the slots record component.
    • id

      private final Optional<UUID> id
      The field for the id record component.
    • EQUIPMENT_SLOT_LIST_CODEC

      private static final com.mojang.serialization.Codec<List<EquipmentSlot>> EQUIPMENT_SLOT_LIST_CODEC
      Mappings:
      Namespace Name Mixin selector
      official h Leio$b;h:Lcom/mojang/serialization/Codec;
      intermediary field_45838 Lnet/minecraft/class_137$class_138;field_45838:Lcom/mojang/serialization/Codec;
      named EQUIPMENT_SLOT_LIST_CODEC Lnet/minecraft/loot/function/SetAttributesLootFunction$Attribute;EQUIPMENT_SLOT_LIST_CODEC:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<SetAttributesLootFunction.Attribute> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Leio$b;a:Lcom/mojang/serialization/Codec;
      intermediary field_45837 Lnet/minecraft/class_137$class_138;field_45837:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/loot/function/SetAttributesLootFunction$Attribute;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • Attribute

      Attribute(String name, RegistryEntry<EntityAttribute> registryEntry, EntityAttributeModifier.Operation operation, LootNumberProvider amount, List<EquipmentSlot> list, Optional<UUID> optional)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leio$b;<init>(Ljava/lang/String;Lih;Lbnp$a;Lekq;Ljava/util/List;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_137$class_138;<init>(Ljava/lang/String;Lnet/minecraft/class_6880;Lnet/minecraft/class_1322$class_1323;Lnet/minecraft/class_5658;Ljava/util/List;Ljava/util/Optional;)V
      named <init> Lnet/minecraft/loot/function/SetAttributesLootFunction$Attribute;<init>(Ljava/lang/String;Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;Lnet/minecraft/loot/provider/number/LootNumberProvider;Ljava/util/List;Ljava/util/Optional;)V
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • attribute

      public RegistryEntry<EntityAttribute> attribute()
      Returns the value of the attribute record component.
      Returns:
      the value of the attribute record component
    • operation

      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • amount

      public LootNumberProvider amount()
      Returns the value of the amount record component.
      Returns:
      the value of the amount record component
    • slots

      public List<EquipmentSlot> slots()
      Returns the value of the slots record component.
      Returns:
      the value of the slots record component
    • id

      public Optional<UUID> id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component