Class Path

java.lang.Object
com.zenith.feature.pathfinder.calc.PathBase
com.zenith.feature.pathfinder.calc.Path
All Implemented Interfaces:
IPath

public class Path extends PathBase
  • Method Details

    • getGoal

      public Goal getGoal()
      Returns:
      The goal that this path was calculated towards
    • postProcess

      public IPath postProcess()
      Description copied from interface: IPath
      This path is actually going to be executed in the world. Do whatever additional processing is required. (as opposed to Path objects that are just constructed every frame for rendering)
      Returns:
      The result of path post processing
    • movements

      public List<IMovement> movements()
      Description copied from interface: IPath
      Ordered list of movements to carry out. movements.get(i).getSrc() should equal positions.get(i) movements.get(i).getDest() should equal positions.get(i+1) movements.size() should equal positions.size()-1
      Returns:
      All of the movements to carry out
    • positions

      public List<BlockPos> positions()
      Description copied from interface: IPath
      All positions along the way. Should begin with the same as getSrc and end with the same as getDest
      Returns:
      All of the positions along this path
    • getNumNodesConsidered

      public int getNumNodesConsidered()
      Description copied from interface: IPath
      Returns the number of nodes that were considered during calculation before this path was found.
      Returns:
      The number of nodes that were considered before finding this path
    • getSrc

      public BlockPos getSrc()
      Description copied from interface: IPath
      Returns the start position of this path. This is the first element in the List that is returned by IPath.positions().
      Returns:
      The start position of this path
    • getDest

      public BlockPos getDest()
      Description copied from interface: IPath
      Returns the end position of this path. This is the last element in the List that is returned by IPath.positions().
      Returns:
      The end position of this path.