Class Region
- java.lang.Object
-
- com.runemate.game.api.hybrid.region.Region
-
public final class Region extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Region.CollisionFlags
static interface
Region.RenderFlags
static class
Region.Template
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
cacheCollisionFlags(boolean enable)
Deprecated.static Area.Rectangular
getArea()
static Coordinate
getBase()
By default, looks up the result of the last region update fromRegionListener
.static @Nullable Coordinate
getBase(int plane)
static @org.jetbrains.annotations.Nullable int[][][]
getCollisionFlags()
static @org.jetbrains.annotations.Nullable int[][]
getCollisionFlags(int plane)
static Coordinate
getCurrentBase()
Retrieves the base of the current loaded map directly from the game, updating the cache used bygetBase()
if necessary.static int
getCurrentPlane()
static int
getDepth()
Deprecated.static int
getFloors()
Gets the amount of floors available starting at 0.static int
getHeight()
Gets the height (y size)static int[][][]
getHeights()
static Coordinate.HighPrecision
getHighPrecisionBase()
static java.util.List<Entity>
getHoveredEntities()
static int[][][]
getInstanceTemplateChunks()
Contains the raw data (as it is represented in the game client) that defines the currently loaded instance template chunks.static int[]
getLoadedRegionIds()
static byte[][][]
getRenderFlags()
static Region.Template
getTemplate(int localX, int localY, int plane)
static Region.Template
getTemplate(Coordinate loaded)
static java.util.List<Region.Template>
getTemplates()
static int
getWidth()
Gets with width (x size)static boolean
isCachingCollisionFlags()
Deprecated.static boolean
isInstanced()
static boolean
isShardedInstance()
static boolean
isUnique()
Deprecated.Region#isInstanced()
-
-
-
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()
-
getArea
public static Area.Rectangular getArea()
-
getBase
public static Coordinate getBase()
By default, looks up the result of the last region update fromRegionListener
. Otherwise, usesgetCurrentBase()
.- 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 bygetBase()
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)
-
getHighPrecisionBase
public static Coordinate.HighPrecision getHighPrecisionBase()
-
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)
-
getTemplate
public static Region.Template getTemplate(Coordinate loaded)
-
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()
-
-