Package net.minecraft.predicate.item
Record Class AttributeModifiersPredicate.AttributeModifierPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.item.AttributeModifiersPredicate.AttributeModifierPredicate
- Record Components:
attribute-id-amount-operation-slot-
- All Implemented Interfaces:
Predicate<AttributeModifiersComponent.Entry>
- Enclosing class:
AttributeModifiersPredicate
public static record AttributeModifiersPredicate.AttributeModifierPredicate(Optional<RegistryEntryList<EntityAttribute>> attribute, Optional<Identifier> id, NumberRange.DoubleRange amount, Optional<EntityAttributeModifier.Operation> operation, Optional<AttributeModifierSlot> slot)
extends Record
implements Predicate<AttributeModifiersComponent.Entry>
- Mappings:
Namespace Name named net/minecraft/predicate/item/AttributeModifiersPredicate$AttributeModifierPredicateintermediary net/minecraft/class_9653$class_9654official ch$anamed attributeintermediary comp_2624official bnamed idintermediary comp_2625official cnamed amountintermediary comp_2627official dnamed operationintermediary comp_2628official enamed slotintermediary comp_2629official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NumberRange.DoubleRangeThe field for theamountrecord component.private final Optional<RegistryEntryList<EntityAttribute>> The field for theattributerecord component.static final com.mojang.serialization.Codec<AttributeModifiersPredicate.AttributeModifierPredicate> private final Optional<Identifier> The field for theidrecord component.private final Optional<EntityAttributeModifier.Operation> The field for theoperationrecord component.private final Optional<AttributeModifierSlot> The field for theslotrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeModifierPredicate(Optional<RegistryEntryList<EntityAttribute>> optional, Optional<Identifier> optional2, NumberRange.DoubleRange doubleRange, Optional<EntityAttributeModifier.Operation> optional3, Optional<AttributeModifierSlot> optional4) -
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.Returns the value of theoperationrecord component.slot()Returns the value of theslotrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
attribute
The field for theattributerecord component. -
id
The field for theidrecord component. -
amount
The field for theamountrecord component. -
operation
The field for theoperationrecord component. -
slot
The field for theslotrecord component. -
CODEC
public static final com.mojang.serialization.Codec<AttributeModifiersPredicate.AttributeModifierPredicate> CODEC- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/item/AttributeModifiersPredicate$AttributeModifierPredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_51379Lnet/minecraft/class_9653$class_9654;field_51379:Lcom/mojang/serialization/Codec;official aLch$a;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
AttributeModifierPredicate
public AttributeModifierPredicate(Optional<RegistryEntryList<EntityAttribute>> optional, Optional<Identifier> optional2, NumberRange.DoubleRange doubleRange, Optional<EntityAttributeModifier.Operation> optional3, Optional<AttributeModifierSlot> optional4)
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<AttributeModifiersComponent.Entry>- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/item/AttributeModifiersPredicate$AttributeModifierPredicate;test(Lnet/minecraft/component/type/AttributeModifiersComponent$Entry;)Zintermediary method_59671Lnet/minecraft/class_9653$class_9654;method_59671(Lnet/minecraft/class_9285$class_9287;)Zofficial aLch$a;a(Lcxn$b;)Z
-
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). -
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-