Class GroundItems
java.lang.Object
com.botwithus.bot.api.entities.GroundItems
Ground-item query facade. Singleton per
GameAPI; obtain via
api.groundItems().
Snapshot-backed (v15+) — reads from api.snapshot().groundItems()
each time the source is materialised, mirroring the Npcs and
SceneObjects pattern. The producer publishes every alive ground
stack within the loaded-scene tile bounds each tick.
GroundItem coins = api.groundItems().query()
.filter(g -> g.itemId() == 995)
.nearest();
if (coins != null) coins.interact("Take");
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallByGameval(String gameval) All ground stacks of the item with the given gameval name.voidintnearestByGameval(String gameval) Nearest ground stack of the item with the given gameval name (e.g.query()
-
Constructor Details
-
GroundItems
-
-
Method Details
-
query
-
nearestByGameval
Nearest ground stack of the item with the given gameval name (e.g."COINS"), ornull. -
allByGameval
All ground stacks of the item with the given gameval name. -
clearDefinitionCache
public void clearDefinitionCache() -
definitionCacheSize
public int definitionCacheSize()
-