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
ConstructorDescriptionVectorNode
(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 TypeMethodDescriptionvoid
addCallback
(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.float
distance
(VectorNode to) boolean
getGoal()
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 pointint
hashCode()
float
heuristicDistance
(Vector goal) void
setPathVectors
(List<Vector> vectors) Sets the path vectors that will be used at pathfinding time.void
Sets 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:PathPoint
Adds a path callback that will be executed if this path point is executed.- Specified by:
addCallback
in interfacePathPoint
-
buildPlan
-
createAtOffset
Description copied from interface:PathPoint
Returns a new PathPoint at a given Vector.- Specified by:
createAtOffset
in interfacePathPoint
-
distance
-
equals
-
getGoal
Description copied from interface:PathPoint
Gets the destination Vector -
getNeighbours
- Specified by:
getNeighbours
in classAStarNode
-
getNeighbours
-
getNeighbours
-
getParentPoint
Description copied from interface:PathPoint
Gets the parent PathPoint- Specified by:
getParentPoint
in interfacePathPoint
-
getPathVectors
Description copied from interface:PathPoint
Gets the list of manual path vectors- Specified by:
getPathVectors
in interfacePathPoint
- See Also:
-
getVector
Description copied from interface:PathPoint
Gets the vector represented by this point -
hashCode
public int hashCode() -
heuristicDistance
-
setPathVectors
Description copied from interface:PathPoint
Sets 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:
setPathVectors
in interfacePathPoint
-
setVector
Description copied from interface:PathPoint
Sets the vector location of this point
-