Package rsb.methods
Class Objects
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Objects
Provides access to in-game physical objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA filter that accepts all matches.Fields inherited from class rsb.methods.MethodProvider
methods
-
Method Summary
Modifier and TypeMethodDescriptionfindNearest
(int distance, String... names) Returns theRSObject
that is nearest, out of all of the RSObjects with the provided name(s).RSObject[]
getAll()
Returns all theRSObject
s in the local region.RSObject[]
Returns all theRSObject
s in the local region accepted by the provided Filter.RSObject[]
Returns theRSObject
s which are on the specifiedRSTile
.RSObject[]
Returns theRSObject
s which are on the specifiedRSTile
matching types specified by the flags in the provided mask.getNearest
(int... ids) Returns theRSObject
that is nearest, out of all of the RSObjects with the provided ID(s).getNearest
(int distance, Predicate<RSObject> filter) Returns theRSObject
that is nearest out of all objects that are accepted by the provided Filter.getNearest
(String... names) Returns theRSObject
that is nearest, out of all of the RSObjects with the provided name(s).getNearest
(Predicate<RSObject> filter) Returns theRSObject
that is nearest out of all objects that are accepted by the provided Filter.Returns the topRSObject
on the specified tile.Returns the topRSObject
on the specified tile matching types specified by the flags in the provided mask.
-
Field Details
-
ALL_FILTER
A filter that accepts all matches.
-
-
Method Details
-
getAll
Returns all theRSObject
s in the local region.- Returns:
- An
RSObject[]
of all objects in the loaded region.
-
getAll
Returns all theRSObject
s in the local region accepted by the provided Filter.- Parameters:
filter
- Filters out unwanted objects.- Returns:
- An
RSObject[]
of all the accepted objects in the loaded region.
-
getNearest
Returns theRSObject
that is nearest out of all objects that are accepted by the provided Filter.- Parameters:
filter
- Filters out unwanted objects.- Returns:
- An
RSObject
representing the nearest object that was accepted by the filter; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObject
that is nearest out of all objects that are accepted by the provided Filter.- Parameters:
distance
- The distance away from the player to checkfilter
- Filters out unwanted objects.- Returns:
- An
RSObject
representing the nearest object that was accepted by the filter; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObject
that is nearest, out of all of the RSObjects with the provided ID(s).- Parameters:
ids
- The ID(s) of the RSObject that you are searching.- Returns:
- An
RSObject
representing the nearest object with one of the provided IDs; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObject
that is nearest, out of all of the RSObjects with the provided name(s).- Parameters:
names
- The name(s) of the RSObject that you are searching.- Returns:
- An
RSObject
representing the nearest object with one of the provided names; or null if there are no matching objects in the current region.
-
findNearest
Returns theRSObject
that is nearest, out of all of the RSObjects with the provided name(s).- Parameters:
distance
- The distance from the player to search withinnames
- The name(s) of the RSObject that you are searching.- Returns:
- An
RSObject
representing the nearest object with one of the provided names; or null if there are no matching objects in the current region.
-
getTopAt
Returns the topRSObject
on the specified tile.- Parameters:
t
- The tile on which to search.- Returns:
- The top RSObject on the provided tile; or null if none found.
-
getTopAt
Returns the topRSObject
on the specified tile matching types specified by the flags in the provided mask.- Parameters:
t
- The tile on which to search.mask
- The type flags.- Returns:
- The top RSObject on the provided tile matching the specified flags; or null if none found.
-
getAt
Returns theRSObject
s which are on the specifiedRSTile
matching types specified by the flags in the provided mask.- Parameters:
t
- The tile on which to search.mask
- The type flags.- Returns:
- An RSObject[] of the objects on the specified tile.
-
getAllAt
Returns theRSObject
s which are on the specifiedRSTile
.- Parameters:
t
- The tile on which to search.- Returns:
- An RSObject[] of the objects on the specified tile.
-