Class RegionPath

  • All Implemented Interfaces:
    Renderable

    public final class RegionPath
    extends CoordinatePath
    A path generated using clipping data regarding the local player's current region. Can generate perfect paths assuming the entire path exists in the current region and there aren't any obstacles that the path would need to traverse.
    • Method Detail

      • buildTo

        @Nullable
        public static @Nullable RegionPath buildTo​(Locatable... destinations)
        Generates a path from your local position to the first destination that it can reach. Passing multiple destinations is most beneficial when you're not entirely sure which object or npc would be fastest to reach. This implementation is significantly faster than several independent searches.
      • buildTo

        @Nullable
        public static @Nullable RegionPath buildTo​(java.util.Collection<? extends Locatable> destinations)
        Generates a path from your local position to the first destination that it can reach. Passing multiple destinations is most beneficial when you're not entirely sure which object or npc would be fastest to reach. This implementation is significantly faster than several independent searches.
      • buildBetween

        @Nullable
        public static @Nullable RegionPath buildBetween​(Locatable start,
                                                        java.util.Collection<? extends Locatable> destinations)
        Generates a path from start to the first destination that it can reach. Passing multiple destinations is most beneficial when you're not entirely sure which object or npc would be fastest to reach. This implementation is significantly faster than several independent searches.
      • buildBetween

        @Nullable
        public static @Nullable RegionPath buildBetween​(Locatable start,
                                                        java.util.Collection<? extends Locatable> destinations,
                                                        int[][][] collision_flags,
                                                        Coordinate regionBase)
        For caching, generates a path from start to the first destination that it can reach using the provided collision flags. Passing multiple destinations is most beneficial when you're not entirely sure which object or npc would be fastest to reach. This implementation is significantly faster than several independent searches.
      • buildBetween

        @Nullable
        public static @Nullable RegionPath buildBetween​(Locatable start,
                                                        java.util.Collection<? extends Locatable> destinations,
                                                        int[][] flags2d,
                                                        Coordinate regionBase)
      • buildBetween

        @Nullable
        public static @Nullable RegionPath buildBetween​(Locatable start,
                                                        java.util.Collection<? extends Locatable> destinations,
                                                        int[][][] collision_flags)
      • getGenerationTime

        @Deprecated
        public long getGenerationTime()
        Deprecated.
        Gets the amount of milliseconds that it took to generate this path.
      • getVertices

        public java.util.List<Coordinate> getVertices()
        Description copied from class: Path
        Gets a list of the vertices in this path
        Specified by:
        getVertices in class CoordinatePath
        Returns:
        A List