Package net.minecraft.loot.function
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$bintermediary net/minecraft/class_137$class_138named net/minecraft/loot/function/SetAttributesLootFunction$Attributeofficial bintermediary comp_1859named nameofficial cintermediary comp_1860named attributeofficial dintermediary comp_1861named operationofficial eintermediary comp_1862named amountofficial fintermediary comp_1863named slotsofficial gintermediary comp_1864named id
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LootNumberProviderThe field for theamountrecord component.private final RegistryEntry<EntityAttribute>The field for theattributerecord component.static final com.mojang.serialization.Codec<SetAttributesLootFunction.Attribute>private static final com.mojang.serialization.Codec<List<EquipmentSlot>>The field for theidrecord component.private final StringThe field for thenamerecord component.private final EntityAttributeModifier.OperationThe field for theoperationrecord component.private final List<EquipmentSlot>The field for theslotsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAttribute(String name, RegistryEntry<EntityAttribute> registryEntry, EntityAttributeModifier.Operation operation, LootNumberProvider amount, List<EquipmentSlot> list, Optional<UUID> optional) -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.Returns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.Returns the value of theoperationrecord component.slots()Returns the value of theslotsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
attribute
The field for theattributerecord component. -
operation
The field for theoperationrecord component. -
amount
The field for theamountrecord component. -
slots
The field for theslotsrecord component. -
id
The field for theidrecord component. -
EQUIPMENT_SLOT_LIST_CODEC
- Mappings:
Namespace Name Mixin selector official hLeio$b;h:Lcom/mojang/serialization/Codec;intermediary field_45838Lnet/minecraft/class_137$class_138;field_45838:Lcom/mojang/serialization/Codec;named EQUIPMENT_SLOT_LIST_CODECLnet/minecraft/loot/function/SetAttributesLootFunction$Attribute;EQUIPMENT_SLOT_LIST_CODEC:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official aLeio$b;a:Lcom/mojang/serialization/Codec;intermediary field_45837Lnet/minecraft/class_137$class_138;field_45837:Lcom/mojang/serialization/Codec;named CODECLnet/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;)Vintermediary <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;)Vnamed <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
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
slots
Returns the value of theslotsrecord component.- Returns:
- the value of the
slotsrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-