Class VectorNode
java.lang.Object
net.citizensnpcs.api.astar.AStarNode
net.citizensnpcs.api.astar.pathfinder.VectorNode
- All Implemented Interfaces:
Comparable<AStarNode>,PathPoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.citizensnpcs.api.astar.pathfinder.PathPoint
PathPoint.PathCallback -
Constructor Summary
ConstructorsConstructorDescriptionVectorNode(VectorGoal goal, Location location, BlockSource source, BlockExaminer... examiners) VectorNode(VectorNode parent, VectorGoal goal, Vector location, BlockSource source, BlockExaminer... examiners) VectorNode(VectorNode parent, Vector location, net.citizensnpcs.api.astar.pathfinder.VectorNode.PathInfo info) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallback(PathPoint.PathCallback callback) Adds a path callback that will be executed if this path point is executed.createAtOffset(Vector mod) Returns a new PathPoint at a given Vector.floatdistance(VectorNode to) booleangetGoal()Gets the destination VectorgetNeighbours(BlockSource source, PathPoint point) getNeighbours(BlockSource source, PathPoint point, boolean checkPassable) Gets the parent PathPointGets the list of manual path vectorsGets the vector represented by this pointinthashCode()floatheuristicDistance(Vector goal) voidsetPathVectors(List<Vector> vectors) Sets the path vectors that will be used at pathfinding time.voidSets the vector location of this pointMethods inherited from class net.citizensnpcs.api.astar.AStarNode
compareTo, getParent, getPathCost, orderedPath
-
Constructor Details
-
VectorNode
public VectorNode(VectorGoal goal, Location location, BlockSource source, BlockExaminer... examiners) -
VectorNode
public VectorNode(VectorNode parent, Vector location, net.citizensnpcs.api.astar.pathfinder.VectorNode.PathInfo info) -
VectorNode
public VectorNode(VectorNode parent, VectorGoal goal, Vector location, BlockSource source, BlockExaminer... examiners)
-
-
Method Details
-
addCallback
Description copied from interface:PathPointAdds a path callback that will be executed if this path point is executed.- Specified by:
addCallbackin interfacePathPoint
-
buildPlan
-
createAtOffset
Description copied from interface:PathPointReturns a new PathPoint at a given Vector.- Specified by:
createAtOffsetin interfacePathPoint
-
distance
-
equals
-
getGoal
Description copied from interface:PathPointGets the destination Vector -
getNeighbours
- Specified by:
getNeighboursin classAStarNode
-
getNeighbours
-
getNeighbours
-
getParentPoint
Description copied from interface:PathPointGets the parent PathPoint- Specified by:
getParentPointin interfacePathPoint
-
getPathVectors
Description copied from interface:PathPointGets the list of manual path vectors- Specified by:
getPathVectorsin interfacePathPoint- See Also:
-
getVector
Description copied from interface:PathPointGets the vector represented by this point -
hashCode
public int hashCode() -
heuristicDistance
-
setPathVectors
Description copied from interface:PathPointSets the path vectors that will be used at pathfinding time. For example, setting a list of vectors to path through in order to reach this pathpoint.- Specified by:
setPathVectorsin interfacePathPoint
-
setVector
Description copied from interface:PathPointSets the vector location of this point
-