Interface PathConstraint
- All Known Subinterfaces:
DelegatePathConstraint
- All Known Implementing Classes:
NoBlockActionsConstraint, NoBlockBreakingConstraint, NoBlockPlacingConstraint, PathConstraintImpl
public interface PathConstraint
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the cost penalty for breaking a block during pathfinding.booleanbooleancanBreakBlock(SFVec3i pos, net.minecraft.world.level.block.state.BlockState blockState) booleanbooleancanPlaceBlock(SFVec3i pos) booleanbooleancollidesWithAtEdge(DiagonalCollisionCalculator.CollisionData collisionData) booleanReturns whether pruning of the pathfinding search space is disabled.booleanintReturns the maximum time in seconds before pathfinding gives up.booleanisOutOfLevel(net.minecraft.world.level.block.state.BlockState blockState, SFVec3i pos) booleanisPlaceable(net.minecraft.world.item.ItemStack item) booleanisTool(net.minecraft.world.item.ItemStack item) modifyAsNeeded(GraphInstructions instruction) doubleReturns the cost penalty for placing a block during pathfinding.
-
Method Details
-
doUsableBlocksDecreaseWhenPlaced
boolean doUsableBlocksDecreaseWhenPlaced() -
canBlocksDropWhenBroken
boolean canBlocksDropWhenBroken() -
canBreakBlocks
boolean canBreakBlocks() -
canPlaceBlocks
boolean canPlaceBlocks() -
isPlaceable
boolean isPlaceable(net.minecraft.world.item.ItemStack item) -
isTool
boolean isTool(net.minecraft.world.item.ItemStack item) -
isOutOfLevel
-
canBreakBlock
-
canPlaceBlock
-
collidesWithAtEdge
-
modifyAsNeeded
-
breakBlockPenalty
double breakBlockPenalty()Returns the cost penalty for breaking a block during pathfinding. -
placeBlockPenalty
double placeBlockPenalty()Returns the cost penalty for placing a block during pathfinding. -
expireTimeout
int expireTimeout()Returns the maximum time in seconds before pathfinding gives up. -
disablePruning
boolean disablePruning()Returns whether pruning of the pathfinding search space is disabled.
-