Record Class BlockPredicates
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BlockPredicates
public record BlockPredicates(@NotNull List<BlockPredicate> predicates, boolean showInTooltip)
extends Record
implements Predicate<Block>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BinaryTagSerializer
<BlockPredicates> static final NetworkBuffer.Type
<BlockPredicates> static final BlockPredicates
Will never match any block. -
Constructor Summary
ConstructorDescriptionBlockPredicates
(@NotNull List<BlockPredicate> predicates) BlockPredicates
(@NotNull List<BlockPredicate> predicates, boolean showInTooltip) Creates an instance of aBlockPredicates
record class.BlockPredicates
(@NotNull BlockPredicate predicate) BlockPredicates
(@NotNull BlockPredicate predicate, boolean showInTooltip) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<BlockPredicate> Returns the value of thepredicates
record component.boolean
Returns the value of theshowInTooltip
record component.boolean
final String
toString()
Returns a string representation of this record class.@NotNull BlockPredicates
withTooltip
(boolean showInTooltip)
-
Field Details
-
NEVER
Will never match any block. -
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
BlockPredicates
Creates an instance of aBlockPredicates
record class.- Parameters:
predicates
- the value for thepredicates
record componentshowInTooltip
- the value for theshowInTooltip
record component
-
BlockPredicates
-
BlockPredicates
-
BlockPredicates
-
-
Method Details
-
withTooltip
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
predicates
Returns the value of thepredicates
record component.- Returns:
- the value of the
predicates
record component
-
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltip
record component.- Returns:
- the value of the
showInTooltip
record component
-