Package rs.kreme.ksbot.api.queries
Class TileItemQuery
- java.lang.Object
-
- rs.kreme.ksbot.api.queries.Query<KSGroundItem,TileItemQuery>
-
- rs.kreme.ksbot.api.queries.TileItemQuery
-
public class TileItemQuery extends Query<KSGroundItem,TileItemQuery>
A specialized query class for filtering and retrieving ground items in the game. Extends the genericQuery
class and integrates contextual game utilities.
-
-
Constructor Summary
Constructors Constructor Description TileItemQuery(java.util.Collection<KSGroundItem> tileItems)
Constructs a new TileItemQuery instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TileItemQuery
abovePrice(int value)
Filters ground items whose total value (price * quantity) exceeds a specified value.TileItemQuery
abovePriceItem(int value)
Filters ground items with a price greater than or equal to a specified value.TileItemQuery
inLocation(WorldArea area)
Filters ground items located within a specific area.KSGroundItem
nearestToPlayer()
Finds the ground item nearest to the local player.KSGroundItem
nearestToPoint(net.runelite.api.coords.WorldPoint point)
Finds the ground item nearest to a specified point.TileItemQuery
notInLocation(WorldArea area)
Filters ground items located outside a specific area.TileItemQuery
notYourLoot()
Filters ground items not in the player's loot list.TileItemQuery
onlyNoted()
Filters only noted ground items.TileItemQuery
onlyUnnoted()
Filters only unnoted ground items.TileItemQuery
withinDistance(int distance)
Filters ground items within a certain distance of the local player.TileItemQuery
withinDistanceToPoint(int distance, net.runelite.api.coords.WorldPoint point)
Filters ground items within a certain distance of a specified point.TileItemQuery
yourLoot()
Filters ground items belonging to the player's loot list.-
Methods inherited from class rs.kreme.ksbot.api.queries.Query
count, empty, exists, filter, first, first, last, list, list, max, min, omit, omit, omit, random, shuffledList, shuffledList, sorted, stream, unique, withId, withName, withNameOrId, withOption, withoutId, withoutName, withoutNameOrId, withoutOption
-
-
-
-
Constructor Detail
-
TileItemQuery
public TileItemQuery(java.util.Collection<KSGroundItem> tileItems)
Constructs a new TileItemQuery instance.- Parameters:
tileItems
- the collection of ground items to query.
-
-
Method Detail
-
inLocation
public TileItemQuery inLocation(WorldArea area)
Filters ground items located within a specific area.- Parameters:
area
- the area to check for item presence.- Returns:
- the current query instance with filtered items.
-
notInLocation
public TileItemQuery notInLocation(WorldArea area)
Filters ground items located outside a specific area.- Parameters:
area
- the area to exclude items from.- Returns:
- the current query instance with filtered items.
-
yourLoot
public TileItemQuery yourLoot()
Filters ground items belonging to the player's loot list.- Returns:
- the current query instance with the player's loot items.
-
notYourLoot
public TileItemQuery notYourLoot()
Filters ground items not in the player's loot list.- Returns:
- the current query instance excluding the player's loot items.
-
onlyNoted
public TileItemQuery onlyNoted()
Filters only noted ground items.- Returns:
- the current query instance with only noted items.
-
onlyUnnoted
public TileItemQuery onlyUnnoted()
Filters only unnoted ground items.- Returns:
- the current query instance with only unnoted items.
-
abovePriceItem
public TileItemQuery abovePriceItem(int value)
Filters ground items with a price greater than or equal to a specified value.- Parameters:
value
- the minimum price of items to include.- Returns:
- the current query instance with items above the specified price.
-
abovePrice
public TileItemQuery abovePrice(int value)
Filters ground items whose total value (price * quantity) exceeds a specified value.- Parameters:
value
- the minimum total value of items to include.- Returns:
- the current query instance with items above the specified total value.
-
withinDistance
public TileItemQuery withinDistance(int distance)
Filters ground items within a certain distance of the local player.- Parameters:
distance
- the maximum distance to include items.- Returns:
- the current query instance with items within the specified distance.
-
withinDistanceToPoint
public TileItemQuery withinDistanceToPoint(int distance, net.runelite.api.coords.WorldPoint point)
Filters ground items within a certain distance of a specified point.- Parameters:
distance
- the maximum distance to include items.point
- the reference point to calculate distances from.- Returns:
- the current query instance with items within the specified distance.
-
nearestToPlayer
public KSGroundItem nearestToPlayer()
Finds the ground item nearest to the local player.- Returns:
- the nearest ground item to the player, or null if no items exist.
-
nearestToPoint
public KSGroundItem nearestToPoint(net.runelite.api.coords.WorldPoint point)
Finds the ground item nearest to a specified point.- Parameters:
point
- the reference point to find the nearest item.- Returns:
- the nearest ground item to the point, or null if no items exist.
-
-