This commit is contained in:
Leijurv 2018-08-03 12:52:25 -04:00
parent d382de2b52
commit 9afcdedf81
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 26 additions and 3 deletions

View File

@ -12,20 +12,43 @@ import java.util.Objects;
* @author leijurv
*/
class PathNode {
/**
* The position of this node
*/
final BlockPos pos;
/**
* The goal it's going towards
*/
final Goal goal;
/**
* Cached, should always be equal to goal.heuristic(pos)
*/
final double estimatedCostToGoal;
// These three fields are mutable and are changed by PathFinder
/**
* Total cost of getting from start to here
* Mutable and changed by PathFinder
*/
double cost;
/**
* Should always be equal to estimatedCosttoGoal + cost
* Mutable and changed by PathFinder
*/
public double combinedCost;
/**
* In the graph search, what previous node contributed to the cost
* Mutable and changed by PathFinder
*/
PathNode previous;
/**
* In the graph search, what previous movement (edge) was taken to get to here
* Mutable and changed by PathFinder
*/
Movement previousMovement;
/**