Record Class DataComponentPredicate.AttributeModifierPredicate
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.predicate.DataComponentPredicate.AttributeModifierPredicate
- Record Components:
attribute- The type of attribute to match, or null to ignoreid- The attribute ID to match, or null to ignoreamount- The attribute's amount to match, or null to ignoreoperation- The attribute's operation to match, or null to ignoreslot- The attribute's equipment slot to match, or null to ignore
- All Implemented Interfaces:
Predicate<AttributeList.Modifier>
- Enclosing interface:
DataComponentPredicate
public static record DataComponentPredicate.AttributeModifierPredicate(@Nullable Attribute attribute, @Nullable Key id, Range.Double amount, @Nullable AttributeOperation operation, @Nullable EquipmentSlotGroup slot)
extends Record
implements Predicate<AttributeList.Modifier>
Tests an attribute modifier.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<DataComponentPredicate.AttributeModifierPredicate> -
Constructor Summary
ConstructorsConstructorDescriptionAttributeModifierPredicate(@Nullable Attribute attribute, @Nullable Key id, Range.Double amount, @Nullable AttributeOperation operation, @Nullable EquipmentSlotGroup slot) Creates an instance of aAttributeModifierPredicaterecord class. -
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.booleantest(AttributeList.Modifier other) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
AttributeModifierPredicate
public AttributeModifierPredicate(@Nullable @Nullable Attribute attribute, @Nullable @Nullable Key id, @Nullable Range.Double amount, @Nullable @Nullable AttributeOperation operation, @Nullable @Nullable EquipmentSlotGroup slot) Creates an instance of aAttributeModifierPredicaterecord class.
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<AttributeList.Modifier>
-
toString
-
hashCode
-
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
-
id
-
amount
-
operation
-
slot
-