Interface TileEntityProvider<T extends TileEntity>

Type Parameters:
T - the type of tile entity this provider manages, must extend TileEntity
All Superinterfaces:
EntityProvider<T>, SceneEntityProvider<T>
All Known Subinterfaces:
ITileItems, ITileObjects

public interface TileEntityProvider<T extends TileEntity> extends SceneEntityProvider<T>
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 Type
    Method
    Description
    getAll(Predicate<? super T> filter, boolean allPlanes)
    Retrieves all entities that match the specified filter, optionally across all planes.
    default List<T>
    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.
    default List<T>
    getAt(net.runelite.api.coords.WorldPoint worldPoint, String... names)
    Gets all entities at a specific world point whose names match any of the given names.
    getAt(net.runelite.api.coords.WorldPoint worldPoint, Predicate<? super T> filter)
    Gets all entities at a specific world point that match the given filter.
    default List<T>
    getAt(ITile tile, int... anyIds)
    Gets all entities at a specific tile whose IDs match any of the given IDs.
    default List<T>
    getAt(ITile tile, String... anyNames)
    Gets all entities at a specific tile whose names match any of the given names.
    getAt(ITile tile, Predicate<? super T> filter)
    Gets all entities at a specific tile that match the given filter.
    default T
    getFirstAt(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 T
    getFirstAt(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 T
    getFirstAt(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 T
    getFirstAt(ITile tile, int... ids)
    Gets the first entity at a specific tile whose ID matches any of the given IDs.
    default T
    getFirstAt(ITile tile, String... names)
    Gets the first entity at a specific tile whose name matches any of the given names.
    default T
    getFirstAt(ITile tile, Predicate<? super T> filter)
    Gets the first entity at a specific tile that matches the given filter.
    default T
    getFirstIn(net.runelite.api.coords.WorldArea area)
    Gets the first entity within a world area with no additional filtering.
    default T
    getFirstIn(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 T
    getFirstIn(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 T
    getFirstIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter)
    Gets the first entity within a world area that matches the given filter.
    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.
    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.
    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.
    default T
    getFirstSurrounding(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 T
    getFirstSurrounding(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 T
    getFirstSurrounding(ITile tile, int radius, Predicate<? super T> filter)
    Gets the first entity within a radius of a specific tile that matches the given filter.
    default List<T>
    getIn(net.runelite.api.coords.WorldArea area, int... anyIds)
    Gets all entities within a world area whose IDs match any of the given IDs.
    default List<T>
    getIn(net.runelite.api.coords.WorldArea area, String... anyNames)
    Gets all entities within a world area whose names match any of the given names.
    getIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter)
    Gets all entities within a world area that match the given filter.
    default T
    getNearestIn(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 T
    getNearestIn(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.
    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.
    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.
    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.
    default List<T>
    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.
    default List<T>
    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

      List<T> getAll(Predicate<? super T> filter, boolean allPlanes)
      Retrieves all entities that match the specified filter, optionally across all planes.

      When allPlanes is 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 against
      allPlanes - 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

      List<T> getAt(ITile tile, Predicate<? super T> filter)
      Gets all entities at a specific tile that match the given filter.
      Parameters:
      tile - the tile to search at
      filter - 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

      default List<T> getAt(ITile tile, int... anyIds)
      Gets all entities at a specific tile whose IDs match any of the given IDs.
      Parameters:
      tile - the tile to search at
      anyIds - 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

      default List<T> getAt(ITile tile, String... anyNames)
      Gets all entities at a specific tile whose names match any of the given names.
      Parameters:
      tile - the tile to search at
      anyNames - 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

      List<T> getAt(net.runelite.api.coords.WorldPoint worldPoint, Predicate<? super T> filter)
      Gets all entities at a specific world point that match the given filter.
      Parameters:
      worldPoint - the world point to search at
      filter - 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

      default List<T> 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.
      Parameters:
      worldPoint - the world point to search at
      ids - 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

      default List<T> getAt(net.runelite.api.coords.WorldPoint worldPoint, String... names)
      Gets all entities at a specific world point whose names match any of the given names.
      Parameters:
      worldPoint - the world point to search at
      names - 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

      default T getFirstAt(ITile tile, Predicate<? super T> filter)
      Gets the first entity at a specific tile that matches the given filter.
      Parameters:
      tile - the tile to search at
      filter - the predicate to test each entity against
      Returns:
      the first matching entity, or null if no entities match
    • getFirstAt

      default T getFirstAt(ITile tile, int... ids)
      Gets the first entity at a specific tile whose ID matches any of the given IDs.
      Parameters:
      tile - the tile to search at
      ids - one or more IDs to match against entity IDs
      Returns:
      the first matching entity, or null if no entities match
    • getFirstAt

      default T getFirstAt(ITile tile, String... names)
      Gets the first entity at a specific tile whose name matches any of the given names.
      Parameters:
      tile - the tile to search at
      names - one or more names to match against entity names
      Returns:
      the first matching entity, or null if no entities match
    • getFirstAt

      default T getFirstAt(net.runelite.api.coords.WorldPoint worldPoint, Predicate<? super T> filter)
      Gets the first entity at a specific world point that matches the given filter.
      Parameters:
      worldPoint - the world point to search at
      filter - the predicate to test each entity against
      Returns:
      the first matching entity, or null if no entities match
    • getFirstAt

      default T getFirstAt(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.
      Parameters:
      worldPoint - the world point to search at
      ids - one or more IDs to match against entity IDs
      Returns:
      the first matching entity, or null if no entities match
    • getFirstAt

      default T getFirstAt(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.
      Parameters:
      worldPoint - the world point to search at
      names - one or more names to match against entity names
      Returns:
      the first matching entity, or null if no entities match
    • getSurrounding

      List<T> getSurrounding(ITile tile, int radius, Predicate<? super T> filter)
      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 tile
      radius - the search radius in tiles
      filter - 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(ITile tile, int radius, int... anyIds)
      Gets all entities within a radius of a specific tile whose IDs match any of the given IDs.
      Parameters:
      tile - the center tile
      radius - the search radius in tiles
      anyIds - 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(ITile tile, int radius, String... anyNames)
      Gets all entities within a radius of a specific tile whose names match any of the given names.
      Parameters:
      tile - the center tile
      radius - the search radius in tiles
      anyNames - 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 point
      radius - the search radius in tiles
      filter - 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 point
      radius - the search radius in tiles
      ids - 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 point
      radius - the search radius in tiles
      names - 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

      default T getFirstSurrounding(ITile tile, int radius, Predicate<? super T> filter)
      Gets the first entity within a radius of a specific tile that matches the given filter.
      Parameters:
      tile - the center tile
      radius - the search radius in tiles
      filter - 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(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.
      Parameters:
      tile - the center tile
      radius - the search radius in tiles
      ids - 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(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.
      Parameters:
      tile - the center tile
      radius - the search radius in tiles
      names - 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 point
      radius - the search radius in tiles
      filter - 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 point
      radius - the search radius in tiles
      ids - 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 point
      radius - the search radius in tiles
      names - one or more names to match against entity names
      Returns:
      the first matching entity within the radius, or null if no entities match
    • getIn

      List<T> getIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter)
      Gets all entities within a world area that match the given filter.
      Parameters:
      area - the world area to search within
      filter - 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

      default List<T> getIn(net.runelite.api.coords.WorldArea area, int... anyIds)
      Gets all entities within a world area whose IDs match any of the given IDs.
      Parameters:
      area - the world area to search within
      anyIds - 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

      default List<T> getIn(net.runelite.api.coords.WorldArea area, String... anyNames)
      Gets all entities within a world area whose names match any of the given names.
      Parameters:
      area - the world area to search within
      anyNames - 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

      default T getFirstIn(net.runelite.api.coords.WorldArea area, Predicate<? super T> filter)
      Gets the first entity within a world area that matches the given filter.
      Parameters:
      area - the world area to search within
      filter - the predicate to test each entity against
      Returns:
      the first matching entity within the area, or null if no entities match
    • getFirstIn

      default T getFirstIn(net.runelite.api.coords.WorldArea area, int... ids)
      Gets the first entity within a world area whose ID matches any of the given IDs.
      Parameters:
      area - the world area to search within
      ids - one or more IDs to match against entity IDs
      Returns:
      the first matching entity within the area, or null if no entities match
    • getFirstIn

      default T getFirstIn(net.runelite.api.coords.WorldArea area, String... names)
      Gets the first entity within a world area whose name matches any of the given names.
      Parameters:
      area - the world area to search within
      names - one or more names to match against entity names
      Returns:
      the first matching entity within the area, or null if no entities match
    • getFirstIn

      default T getFirstIn(net.runelite.api.coords.WorldArea area)
      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

      T 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.

      Distance is calculated from the local player's current position.

      Parameters:
      area - the world area to search within
      filter - the predicate to test each entity against
      Returns:
      the nearest matching entity within the area, or null if no entities match
    • getNearestIn

      default T getNearestIn(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.
      Parameters:
      area - the world area to search within
      ids - one or more IDs to match against entity IDs
      Returns:
      the nearest matching entity within the area, or null if no entities match
    • getNearestIn

      default T getNearestIn(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.
      Parameters:
      area - the world area to search within
      names - one or more names to match against entity names
      Returns:
      the nearest matching entity within the area, or null if no entities match