Record Class NoBlockPlacingConstraint
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.graph.constraint.NoBlockPlacingConstraint
- All Implemented Interfaces:
DelegatePathConstraint, PathConstraint
public record NoBlockPlacingConstraint(PathConstraint delegate)
extends Record
implements DelegatePathConstraint
-
Constructor Summary
ConstructorsConstructorDescriptionNoBlockPlacingConstraint(PathConstraint delegate) Creates an instance of aNoBlockPlacingConstraintrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleandelegate()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, canBreakBlock, canBreakBlocks, canPlaceBlock, collidesWithAtEdge, disablePruning, doUsableBlocksDecreaseWhenPlaced, expireTimeout, isOutOfLevel, isPlaceable, isTool, modifyAsNeeded, placeBlockPenalty
-
Constructor Details
-
NoBlockPlacingConstraint
Creates an instance of aNoBlockPlacingConstraintrecord class.- Parameters:
delegate- the value for thedelegaterecord component
-
-
Method Details
-
canBlocksDropWhenBroken
public boolean canBlocksDropWhenBroken()- Specified by:
canBlocksDropWhenBrokenin interfaceDelegatePathConstraint- Specified by:
canBlocksDropWhenBrokenin interfacePathConstraint
-
canPlaceBlocks
public boolean canPlaceBlocks()- Specified by:
canPlaceBlocksin interfaceDelegatePathConstraint- Specified by:
canPlaceBlocksin 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
-