Record Class BlockPredicates
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BlockPredicates
public record BlockPredicates(@NotNull List<BlockPredicate> predicates)
extends Record
implements Predicate<Block>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockPredicates> static final NetworkBuffer.Type<BlockPredicates> static final BlockPredicatesWill never match any block. -
Constructor Summary
ConstructorsConstructorDescriptionBlockPredicates(@NotNull List<BlockPredicate> predicates) Creates an instance of aBlockPredicatesrecord class.BlockPredicates(@NotNull BlockPredicate predicate) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull List<BlockPredicate> Returns the value of thepredicatesrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
NEVER
Will never match any block. -
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
BlockPredicates
Creates an instance of aBlockPredicatesrecord class.- Parameters:
predicates- the value for thepredicatesrecord component
-
BlockPredicates
-
-
Method Details
-
test
-
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). -
predicates
Returns the value of thepredicatesrecord component.- Returns:
- the value of the
predicatesrecord component
-