Class SplicedPath

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

public class SplicedPath extends PathBase
  • Method Details

    • getGoal

      public Goal getGoal()
      Returns:
      The goal that this path was calculated towards
    • 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
    • length

      public int length()
      Description copied from interface: IPath
      Returns the number of positions in this path. Equivalent to positions().size().
      Returns:
      Number of positions in this path
    • trySplice

      public static Optional<SplicedPath> trySplice(IPath first, IPath second, boolean allowOverlapCutoff)