Class Region


  • public final class Region
    extends java.lang.Object
    • Method Detail

      • cacheCollisionFlags

        @Deprecated
        public static void cacheCollisionFlags​(boolean enable)
        Deprecated.
        Previously offered a passive mechanism to cache collision flags on RS3 which had very high overhead for building collision flags. Now that it's a sub 100ms calculation (and dropping more), this functionality is no longer needed and attempting to determine whether or not to invalidate the cache takes longer than building a new one.
        See Also:
        getCollisionFlags()
      • getBase

        public static Coordinate getBase()
        By default, looks up the result of the last region update from RegionListener. Otherwise, uses getCurrentBase().
        Returns:
        the base of the current loaded map (plane = local player's plane).
      • getCurrentBase

        public static Coordinate getCurrentBase()
        Retrieves the base of the current loaded map directly from the game, updating the cache used by getBase() if necessary.
        Returns:
        the base of the current loaded map (plane = local player's plane).
      • getCollisionFlags

        @Nullable
        public static @org.jetbrains.annotations.Nullable int[][][] getCollisionFlags()
      • getCollisionFlags

        @Nullable
        public static @org.jetbrains.annotations.Nullable int[][] getCollisionFlags​(int plane)
      • getCurrentPlane

        public static int getCurrentPlane()
      • getDepth

        @Deprecated
        public static int getDepth()
        Deprecated.
        Gets the depth (quantity of planes)
        See Also:
        getFloors()
      • getFloors

        public static int getFloors()
        Gets the amount of floors available starting at 0.
      • getHeight

        public static int getHeight()
        Gets the height (y size)
      • getLoadedRegionIds

        public static int[] getLoadedRegionIds()
      • getWidth

        public static int getWidth()
        Gets with width (x size)
      • isCachingCollisionFlags

        @Deprecated
        public static boolean isCachingCollisionFlags()
        Deprecated.
        Gets if the current bot is using cached collision flags
      • isUnique

        @Deprecated
        public static boolean isUnique()
        Deprecated.
        Region#isInstanced()
      • isInstanced

        public static boolean isInstanced()
      • isShardedInstance

        @RS3Only
        public static boolean isShardedInstance()
      • getInstanceTemplateChunks

        public static int[][][] getInstanceTemplateChunks()
        Contains the raw data (as it is represented in the game client) that defines the currently loaded instance template chunks.
        See Also:
        Region.Template, getTemplates()
      • getTemplates

        public static java.util.List<Region.Template> getTemplates()
      • getTemplate

        public static Region.Template getTemplate​(int localX,
                                                  int localY,
                                                  int plane)
      • getRenderFlags

        public static byte[][][] getRenderFlags()
      • getHeights

        public static int[][][] getHeights()
      • getBase

        @Nullable
        public static @Nullable Coordinate getBase​(int plane)
      • getHoveredEntities

        public static java.util.List<Entity> getHoveredEntities()