Package rsb.methods
Class GroundItems
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.GroundItems
Provides access to ground items.
-
Field Summary
FieldsFields inherited from class rsb.methods.MethodProvider
methods
-
Method Summary
Modifier and TypeMethodDescriptiongetAll()
Returns all ground items in the loaded area.getAll
(int range) Returns all ground items within the provided range.getAll
(int range, Filter<RSGroundItem> filter) Returns all matching ground items within the provided range.getAll
(Filter<RSGroundItem> filter) Returns all matching ground items in the loaded area.getAllAt
(int x, int y) Returns all the ground items at a tile on the current plane.Returns all the ground items at a tile on the current plane.getNearest
(int... ids) Returns the nearest item on the ground with an ID that matches any of the IDs provided.getNearest
(Filter<RSGroundItem> filter) Returns the nearest ground item that is accepted by the provided Filter.
-
Field Details
-
ALL_FILTER
-
-
Method Details
-
getAll
Returns all ground items in the loaded area.- Returns:
- All ground items in the loaded area.
-
getAll
Returns all matching ground items in the loaded area.- Parameters:
filter
- Filters out unwanted matches.- Returns:
- All ground items
-
getAll
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
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
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
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
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
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.
-