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 theRSObjectthat is nearest, out of all of the RSObjects with the provided name(s).RSObject[]getAll()Returns all theRSObjects in the local region.RSObject[]Returns all theRSObjects in the local region accepted by the provided Filter.RSObject[]Returns theRSObjects which are on the specifiedRSTile.RSObject[]Returns theRSObjects which are on the specifiedRSTilematching types specified by the flags in the provided mask.getNearest(int... ids) Returns theRSObjectthat is nearest, out of all of the RSObjects with the provided ID(s).getNearest(int distance, Predicate<RSObject> filter) Returns theRSObjectthat is nearest out of all objects that are accepted by the provided Filter.getNearest(String... names) Returns theRSObjectthat is nearest, out of all of the RSObjects with the provided name(s).getNearest(Predicate<RSObject> filter) Returns theRSObjectthat is nearest out of all objects that are accepted by the provided Filter.Returns the topRSObjecton the specified tile.Returns the topRSObjecton 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 theRSObjects in the local region.- Returns:
- An
RSObject[]of all objects in the loaded region.
-
getAll
Returns all theRSObjects 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 theRSObjectthat is nearest out of all objects that are accepted by the provided Filter.- Parameters:
filter- Filters out unwanted objects.- Returns:
- An
RSObjectrepresenting the nearest object that was accepted by the filter; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObjectthat 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
RSObjectrepresenting the nearest object that was accepted by the filter; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObjectthat 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
RSObjectrepresenting the nearest object with one of the provided IDs; or null if there are no matching objects in the current region.
-
getNearest
Returns theRSObjectthat 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
RSObjectrepresenting the nearest object with one of the provided names; or null if there are no matching objects in the current region.
-
findNearest
Returns theRSObjectthat 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
RSObjectrepresenting the nearest object with one of the provided names; or null if there are no matching objects in the current region.
-
getTopAt
Returns the topRSObjecton 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 topRSObjecton 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 theRSObjects which are on the specifiedRSTilematching 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 theRSObjects which are on the specifiedRSTile.- Parameters:
t- The tile on which to search.- Returns:
- An RSObject[] of the objects on the specified tile.
-