Record Class DataComponentPredicates
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.predicate.DataComponentPredicates
- All Implemented Interfaces:
Predicate<DataComponent.Holder>
public record DataComponentPredicates(DataComponentMap exact, ComponentPredicateSet predicates)
extends Record
implements Predicate<DataComponent.Holder>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<DataComponentPredicates> static final DataComponentPredicatesstatic final NetworkBuffer.Type<DataComponentPredicates> -
Constructor Summary
ConstructorsConstructorDescriptionDataComponentPredicates(DataComponentMap exact, ComponentPredicateSet predicates) Creates an instance of aDataComponentPredicatesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.exact()Returns the value of theexactrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepredicatesrecord component.booleantest(DataComponent.Holder holder) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
NETWORK_TYPE
-
-
Constructor Details
-
DataComponentPredicates
Creates an instance of aDataComponentPredicatesrecord class.- Parameters:
exact- the value for theexactrecord componentpredicates- the value for thepredicatesrecord component
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<DataComponent.Holder>
-
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). -
exact
Returns the value of theexactrecord component.- Returns:
- the value of the
exactrecord component
-
predicates
Returns the value of thepredicatesrecord component.- Returns:
- the value of the
predicatesrecord component
-