Record Class NoBlockBreakingConstraint
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.graph.constraint.NoBlockBreakingConstraint
- All Implemented Interfaces:
DelegatePathConstraint, PathConstraint
public record NoBlockBreakingConstraint(PathConstraint delegate)
extends Record
implements DelegatePathConstraint
-
Constructor Summary
ConstructorsConstructorDescriptionNoBlockBreakingConstraint(PathConstraint delegate) Creates an instance of aNoBlockBreakingConstraintrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandelegate()Returns the value of thedelegaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface DelegatePathConstraint
breakBlockPenalty, canBlocksDropWhenBroken, canBreakBlock, canPlaceBlock, canPlaceBlocks, collidesWithAtEdge, disablePruning, doUsableBlocksDecreaseWhenPlaced, expireTimeout, isOutOfLevel, isPlaceable, isTool, modifyAsNeeded, placeBlockPenalty
-
Constructor Details
-
NoBlockBreakingConstraint
Creates an instance of aNoBlockBreakingConstraintrecord class.- Parameters:
delegate- the value for thedelegaterecord component
-
-
Method Details
-
canBreakBlocks
public boolean canBreakBlocks()- Specified by:
canBreakBlocksin interfaceDelegatePathConstraint- Specified by:
canBreakBlocksin interfacePathConstraint
-
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). -
delegate
Returns the value of thedelegaterecord component.- Specified by:
delegatein interfaceDelegatePathConstraint- Returns:
- the value of the
delegaterecord component
-