Package net.storm.api.entities
Interface TileEntityProvider<T extends TileEntity>
- Type Parameters:
T- the type of tile entity this provider manages, must extendTileEntity
- All Superinterfaces:
EntityProvider<T>,SceneEntityProvider<T>
- All Known Subinterfaces:
ITileItems,ITileObjects
An entity provider for tile-based entities with advanced spatial querying capabilities.
This interface extends SceneEntityProvider with methods for querying entities
based on their tile location, including support for:
- Querying entities at a specific tile or world point
- Finding entities within a radius of a location
- Searching for entities within a defined world area
- Filtering across all planes or just the current plane
Tile entities include ground items (ITileItem) and
tile objects (ITileObject) such as game objects,
wall objects, ground objects, and decorative objects.
Example usage:
// Get all items at a specific tile
List<ITileItem> items = tileItems.getAt(tile, item -> item.getQuantity() > 1);
// Get the first ore rock within 5 tiles
ITileObject rock = tileObjects.getFirstSurrounding(myLocation, 5, "Rocks");
// Get all NPCs in a world area
List<ITileObject> objects = tileObjects.getIn(bankArea, "Bank booth");
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves all entities that match the specified filter, optionally across all planes.getAt(net.runelite.api.coords.WorldPoint worldPoint, int... ids) Gets all entities at a specific world point whose IDs match any of the given IDs.Gets all entities at a specific world point whose names match any of the given names.Gets all entities at a specific world point that match the given filter.Gets all entities at a specific tile whose IDs match any of the given IDs.Gets all entities at a specific tile whose names match any of the given names.Gets all entities at a specific tile that match the given filter.default TgetFirstAt(net.runelite.api.coords.WorldPoint worldPoint, int... ids) Gets the first entity at a specific world point whose ID matches any of the given IDs.default TgetFirstAt(net.runelite.api.coords.WorldPoint worldPoint, String... names) Gets the first entity at a specific world point whose name matches any of the given names.default TgetFirstAt(net.runelite.api.coords.WorldPoint worldPoint, Predicate<? super T> filter) Gets the first entity at a specific world point that matches the given filter.default TgetFirstAt(ITile tile, int... ids) Gets the first entity at a specific tile whose ID matches any of the given IDs.default TgetFirstAt(ITile tile, String... names) Gets the first entity at a specific tile whose name matches any of the given names.default TgetFirstAt(ITile tile, Predicate<? super T> filter) Gets the first entity at a specific tile that matches the given filter.default TgetFirstIn(net.runelite.api.coords.WorldArea area) Gets the first entity within a world area with no additional filtering.default TgetFirstIn(net.runelite.api.coords.WorldArea area, int... ids) Gets the first entity within a world area whose ID matches any of the given IDs.default TgetFirstIn(net.runelite.api.coords.WorldArea area, String... names) Gets the first entity within a world area whose name matches any of the given names.default TgetFirstIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter) Gets the first entity within a world area that matches the given filter.default TgetFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, int... ids) Gets the first entity within a radius of a specific world point whose ID matches any of the given IDs.default TgetFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, String... names) Gets the first entity within a radius of a specific world point whose name matches any of the given names.default TgetFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, Predicate<? super T> filter) Gets the first entity within a radius of a specific world point that matches the given filter.default TgetFirstSurrounding(ITile tile, int radius, int... ids) Gets the first entity within a radius of a specific tile whose ID matches any of the given IDs.default TgetFirstSurrounding(ITile tile, int radius, String... names) Gets the first entity within a radius of a specific tile whose name matches any of the given names.default TgetFirstSurrounding(ITile tile, int radius, Predicate<? super T> filter) Gets the first entity within a radius of a specific tile that matches the given filter.getIn(net.runelite.api.coords.WorldArea area, int... anyIds) Gets all entities within a world area whose IDs match any of the given IDs.Gets all entities within a world area whose names match any of the given names.Gets all entities within a world area that match the given filter.default TgetNearestIn(net.runelite.api.coords.WorldArea area, int... ids) Gets the nearest entity to the local player within a world area whose ID matches any of the given IDs.default TgetNearestIn(net.runelite.api.coords.WorldArea area, String... names) Gets the nearest entity to the local player within a world area whose name matches any of the given names.getNearestIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter) Gets the nearest entity to the local player within a world area that matches the given filter.getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, int... ids) Gets all entities within a radius of a specific world point whose IDs match any of the given IDs.getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, String... names) Gets all entities within a radius of a specific world point whose names match any of the given names.getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, Predicate<? super T> filter) Gets all entities within a radius of a specific world point that match the given filter.getSurrounding(ITile tile, int radius, int... anyIds) Gets all entities within a radius of a specific tile whose IDs match any of the given IDs.getSurrounding(ITile tile, int radius, String... anyNames) Gets all entities within a radius of a specific tile whose names match any of the given names.getSurrounding(ITile tile, int radius, Predicate<? super T> filter) Gets all entities within a radius of a specific tile that match the given filter.Methods inherited from interface net.storm.api.entities.SceneEntityProvider
getAll, getAll, getAll, getNearest, getNearest, getNearest, getNearest, getNearest, getNearest
-
Method Details
-
getAll
Retrieves all entities that match the specified filter, optionally across all planes.When
allPlanesis true, entities from all height levels (0-3) are searched. When false, only entities on the current plane are returned.- Parameters:
filter- the predicate to test each entity againstallPlanes- if true, search across all planes; if false, only the current plane- Returns:
- a list of entities matching the filter; never null but may be empty
-
getAt
Gets all entities at a specific tile that match the given filter.- Parameters:
tile- the tile to search atfilter- the predicate to test each entity against- Returns:
- a list of entities at the tile matching the filter; never null but may be empty
-
getAt
Gets all entities at a specific tile whose IDs match any of the given IDs.- Parameters:
tile- the tile to search atanyIds- one or more IDs to match against entity IDs- Returns:
- a list of entities at the tile with matching IDs; never null but may be empty
-
getAt
Gets all entities at a specific tile whose names match any of the given names.- Parameters:
tile- the tile to search atanyNames- one or more names to match against entity names- Returns:
- a list of entities at the tile with matching names; never null but may be empty
-
getAt
Gets all entities at a specific world point that match the given filter.- Parameters:
worldPoint- the world point to search atfilter- the predicate to test each entity against- Returns:
- a list of entities at the world point matching the filter; never null but may be empty
-
getAt
Gets all entities at a specific world point whose IDs match any of the given IDs.- Parameters:
worldPoint- the world point to search atids- one or more IDs to match against entity IDs- Returns:
- a list of entities at the world point with matching IDs; never null but may be empty
-
getAt
Gets all entities at a specific world point whose names match any of the given names.- Parameters:
worldPoint- the world point to search atnames- one or more names to match against entity names- Returns:
- a list of entities at the world point with matching names; never null but may be empty
-
getFirstAt
Gets the first entity at a specific tile that matches the given filter.- Parameters:
tile- the tile to search atfilter- the predicate to test each entity against- Returns:
- the first matching entity, or null if no entities match
-
getFirstAt
Gets the first entity at a specific tile whose ID matches any of the given IDs.- Parameters:
tile- the tile to search atids- one or more IDs to match against entity IDs- Returns:
- the first matching entity, or null if no entities match
-
getFirstAt
Gets the first entity at a specific tile whose name matches any of the given names.- Parameters:
tile- the tile to search atnames- one or more names to match against entity names- Returns:
- the first matching entity, or null if no entities match
-
getFirstAt
Gets the first entity at a specific world point that matches the given filter.- Parameters:
worldPoint- the world point to search atfilter- the predicate to test each entity against- Returns:
- the first matching entity, or null if no entities match
-
getFirstAt
Gets the first entity at a specific world point whose ID matches any of the given IDs.- Parameters:
worldPoint- the world point to search atids- one or more IDs to match against entity IDs- Returns:
- the first matching entity, or null if no entities match
-
getFirstAt
Gets the first entity at a specific world point whose name matches any of the given names.- Parameters:
worldPoint- the world point to search atnames- one or more names to match against entity names- Returns:
- the first matching entity, or null if no entities match
-
getSurrounding
Gets all entities within a radius of a specific tile that match the given filter.The radius defines a square area centered on the tile.
- Parameters:
tile- the center tileradius- the search radius in tilesfilter- the predicate to test each entity against- Returns:
- a list of entities within the radius matching the filter; never null but may be empty
-
getSurrounding
Gets all entities within a radius of a specific tile whose IDs match any of the given IDs.- Parameters:
tile- the center tileradius- the search radius in tilesanyIds- one or more IDs to match against entity IDs- Returns:
- a list of entities within the radius with matching IDs; never null but may be empty
-
getSurrounding
Gets all entities within a radius of a specific tile whose names match any of the given names.- Parameters:
tile- the center tileradius- the search radius in tilesanyNames- one or more names to match against entity names- Returns:
- a list of entities within the radius with matching names; never null but may be empty
-
getSurrounding
List<T> getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, Predicate<? super T> filter) Gets all entities within a radius of a specific world point that match the given filter.The radius defines a square area centered on the world point.
- Parameters:
worldPoint- the center world pointradius- the search radius in tilesfilter- the predicate to test each entity against- Returns:
- a list of entities within the radius matching the filter; never null but may be empty
-
getSurrounding
default List<T> getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, int... ids) Gets all entities within a radius of a specific world point whose IDs match any of the given IDs.- Parameters:
worldPoint- the center world pointradius- the search radius in tilesids- one or more IDs to match against entity IDs- Returns:
- a list of entities within the radius with matching IDs; never null but may be empty
-
getSurrounding
default List<T> getSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, String... names) Gets all entities within a radius of a specific world point whose names match any of the given names.- Parameters:
worldPoint- the center world pointradius- the search radius in tilesnames- one or more names to match against entity names- Returns:
- a list of entities within the radius with matching names; never null but may be empty
-
getFirstSurrounding
Gets the first entity within a radius of a specific tile that matches the given filter.- Parameters:
tile- the center tileradius- the search radius in tilesfilter- the predicate to test each entity against- Returns:
- the first matching entity within the radius, or null if no entities match
-
getFirstSurrounding
Gets the first entity within a radius of a specific tile whose ID matches any of the given IDs.- Parameters:
tile- the center tileradius- the search radius in tilesids- one or more IDs to match against entity IDs- Returns:
- the first matching entity within the radius, or null if no entities match
-
getFirstSurrounding
Gets the first entity within a radius of a specific tile whose name matches any of the given names.- Parameters:
tile- the center tileradius- the search radius in tilesnames- one or more names to match against entity names- Returns:
- the first matching entity within the radius, or null if no entities match
-
getFirstSurrounding
default T getFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, Predicate<? super T> filter) Gets the first entity within a radius of a specific world point that matches the given filter.- Parameters:
worldPoint- the center world pointradius- the search radius in tilesfilter- the predicate to test each entity against- Returns:
- the first matching entity within the radius, or null if no entities match
-
getFirstSurrounding
default T getFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, int... ids) Gets the first entity within a radius of a specific world point whose ID matches any of the given IDs.- Parameters:
worldPoint- the center world pointradius- the search radius in tilesids- one or more IDs to match against entity IDs- Returns:
- the first matching entity within the radius, or null if no entities match
-
getFirstSurrounding
default T getFirstSurrounding(net.runelite.api.coords.WorldPoint worldPoint, int radius, String... names) Gets the first entity within a radius of a specific world point whose name matches any of the given names.- Parameters:
worldPoint- the center world pointradius- the search radius in tilesnames- one or more names to match against entity names- Returns:
- the first matching entity within the radius, or null if no entities match
-
getIn
Gets all entities within a world area that match the given filter.- Parameters:
area- the world area to search withinfilter- the predicate to test each entity against- Returns:
- a list of entities within the area matching the filter; never null but may be empty
-
getIn
Gets all entities within a world area whose IDs match any of the given IDs.- Parameters:
area- the world area to search withinanyIds- one or more IDs to match against entity IDs- Returns:
- a list of entities within the area with matching IDs; never null but may be empty
-
getIn
Gets all entities within a world area whose names match any of the given names.- Parameters:
area- the world area to search withinanyNames- one or more names to match against entity names- Returns:
- a list of entities within the area with matching names; never null but may be empty
-
getFirstIn
Gets the first entity within a world area that matches the given filter.- Parameters:
area- the world area to search withinfilter- the predicate to test each entity against- Returns:
- the first matching entity within the area, or null if no entities match
-
getFirstIn
Gets the first entity within a world area whose ID matches any of the given IDs.- Parameters:
area- the world area to search withinids- one or more IDs to match against entity IDs- Returns:
- the first matching entity within the area, or null if no entities match
-
getFirstIn
Gets the first entity within a world area whose name matches any of the given names.- Parameters:
area- the world area to search withinnames- one or more names to match against entity names- Returns:
- the first matching entity within the area, or null if no entities match
-
getFirstIn
Gets the first entity within a world area with no additional filtering.- Parameters:
area- the world area to search within- Returns:
- the first entity within the area, or null if the area is empty
-
getNearestIn
Gets the nearest entity to the local player within a world area that matches the given filter.Distance is calculated from the local player's current position.
- Parameters:
area- the world area to search withinfilter- the predicate to test each entity against- Returns:
- the nearest matching entity within the area, or null if no entities match
-
getNearestIn
Gets the nearest entity to the local player within a world area whose ID matches any of the given IDs.- Parameters:
area- the world area to search withinids- one or more IDs to match against entity IDs- Returns:
- the nearest matching entity within the area, or null if no entities match
-
getNearestIn
Gets the nearest entity to the local player within a world area whose name matches any of the given names.- Parameters:
area- the world area to search withinnames- one or more names to match against entity names- Returns:
- the nearest matching entity within the area, or null if no entities match
-