Package rsb.methods

Class GroundItems


public class GroundItems extends MethodProvider
Provides access to ground items.
  • Field Details

  • Method Details

    • getAll

      public RSGroundItem[] getAll()
      Returns all ground items in the loaded area.
      Returns:
      All ground items in the loaded area.
    • getAll

      public RSGroundItem[] getAll(Filter<RSGroundItem> filter)
      Returns all matching ground items in the loaded area.
      Parameters:
      filter - Filters out unwanted matches.
      Returns:
      All ground items
    • getAll

      public RSGroundItem[] getAll(int range)
      Returns all ground items within the provided range.
      Parameters:
      range - The range (max distance in all directions) in which to check items for.
      Returns:
      RSGroundItem array containing all of the items in range.
    • getAll

      public RSGroundItem[] getAll(int range, Filter<RSGroundItem> filter)
      Returns all matching ground items within the provided range.
      Parameters:
      range - The range (max distance in all directions) in which to check items for.
      filter - Filters out unwanted matches.
      Returns:
      RSGroundItem array containing all of the items in range.
    • getNearest

      public RSGroundItem getNearest(Filter<RSGroundItem> filter)
      Returns the nearest ground item that is accepted by the provided Filter.
      Parameters:
      filter - Filters out unwanted matches.
      Returns:
      The nearest item that is accepted by the provided Filter; or null.
    • getNearest

      public RSGroundItem getNearest(int... ids)
      Returns the nearest item on the ground with an ID that matches any of the IDs provided.
      Parameters:
      ids - The IDs to look for.
      Returns:
      RSItemTile of the nearest item with the an ID that matches any in the array of IDs provided; or null if no matching ground items were found.
    • getAllAt

      public RSGroundItem[] getAllAt(int x, int y)
      Returns all the ground items at a tile on the current plane.
      Parameters:
      x - The x position of the tile in the world.
      y - The y position of the tile in the world.
      Returns:
      An array of the ground items on the specified tile.
    • getAllAt

      public RSGroundItem[] getAllAt(RSTile t)
      Returns all the ground items at a tile on the current plane.
      Parameters:
      t - The tile.
      Returns:
      An array of the ground items on the specified tile.