Class PathConstraintImpl
java.lang.Object
com.soulfiremc.server.pathfinding.graph.constraint.PathConstraintImpl
- All Implemented Interfaces:
PathConstraint
-
Constructor Summary
ConstructorsConstructorDescriptionPathConstraintImpl(BotConnection botConnection) PathConstraintImpl(@Nullable net.minecraft.client.player.LocalPlayer entity, net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor, boolean allowBreakingUndiggable, boolean avoidDiagonalSqueeze, boolean avoidHarmfulEntities, int maxEnemyPenalty, int breakBlockPenalty, int placeBlockPenalty, int expireTimeout, boolean disablePruning) PathConstraintImpl(@Nullable net.minecraft.client.player.LocalPlayer entity, net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor, BotSettingsSource settingsSource) -
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.
-
Constructor Details
-
PathConstraintImpl
public PathConstraintImpl(@Nullable net.minecraft.client.player.LocalPlayer entity, net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor, boolean allowBreakingUndiggable, boolean avoidDiagonalSqueeze, boolean avoidHarmfulEntities, int maxEnemyPenalty, int breakBlockPenalty, int placeBlockPenalty, int expireTimeout, boolean disablePruning) -
PathConstraintImpl
-
PathConstraintImpl
public PathConstraintImpl(@Nullable net.minecraft.client.player.LocalPlayer entity, net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor, BotSettingsSource settingsSource)
-
-
Method Details
-
doUsableBlocksDecreaseWhenPlaced
public boolean doUsableBlocksDecreaseWhenPlaced()- Specified by:
doUsableBlocksDecreaseWhenPlacedin interfacePathConstraint
-
canBlocksDropWhenBroken
public boolean canBlocksDropWhenBroken()- Specified by:
canBlocksDropWhenBrokenin interfacePathConstraint
-
canBreakBlocks
public boolean canBreakBlocks()- Specified by:
canBreakBlocksin interfacePathConstraint
-
canPlaceBlocks
public boolean canPlaceBlocks()- Specified by:
canPlaceBlocksin interfacePathConstraint
-
isPlaceable
public boolean isPlaceable(net.minecraft.world.item.ItemStack item) - Specified by:
isPlaceablein interfacePathConstraint
-
isTool
public boolean isTool(net.minecraft.world.item.ItemStack item) - Specified by:
isToolin interfacePathConstraint
-
isOutOfLevel
public boolean isOutOfLevel(net.minecraft.world.level.block.state.BlockState blockState, SFVec3i pos) - Specified by:
isOutOfLevelin interfacePathConstraint
-
canBreakBlock
public boolean canBreakBlock(SFVec3i pos, net.minecraft.world.level.block.state.BlockState blockState) - Specified by:
canBreakBlockin interfacePathConstraint
-
canPlaceBlock
- Specified by:
canPlaceBlockin interfacePathConstraint
-
collidesWithAtEdge
- Specified by:
collidesWithAtEdgein interfacePathConstraint
-
modifyAsNeeded
- Specified by:
modifyAsNeededin interfacePathConstraint
-
breakBlockPenalty
public double breakBlockPenalty()Description copied from interface:PathConstraintReturns the cost penalty for breaking a block during pathfinding.- Specified by:
breakBlockPenaltyin interfacePathConstraint
-
placeBlockPenalty
public double placeBlockPenalty()Description copied from interface:PathConstraintReturns the cost penalty for placing a block during pathfinding.- Specified by:
placeBlockPenaltyin interfacePathConstraint
-
expireTimeout
public int expireTimeout()Description copied from interface:PathConstraintReturns the maximum time in seconds before pathfinding gives up.- Specified by:
expireTimeoutin interfacePathConstraint
-
disablePruning
public boolean disablePruning()Description copied from interface:PathConstraintReturns whether pruning of the pathfinding search space is disabled.- Specified by:
disablePruningin interfacePathConstraint
-