Package com.botwithus.bot.api.entities
package com.botwithus.bot.api.entities
Rich entity wrappers and fluent query builders.
This package sits on top of two substrates:
api.snapshot.*— read-only tick-scoped records pulled directly from shared memory. Entity queries iterate these for the cheap path (no RPC).api.GameAPI— RPC and definition lookups for fields that aren't on the snapshot wire (NPC names, options, varbits/varps, etc.). Definition lookups are cached by id.
Obtain query facades through GameAPI:
Npc target = api.npcs().query()
.named("Goblin")
.withinDistance(15)
.filter(n -> n.hasOption("Attack"))
.nearest();
if (target != null) target.interact("Attack");
The facades (Npcs,
Players) are singletons per
GameAPI; only the per-query builder and the per-result wrappers
allocate.
-
ClassDescriptionShared surface for everything an
EntityQuerycan reason about without consulting an entity-specific definition.Fluent query builder shared across entity types.Ground-item query facade.NPC query facade.Query subclass — wires the snapshot stream + name resolution toEntityQuery.Rich wrapper around a snapshotPlayerrecord.Player query facade.Rich wrapper around a snapshotProjectilerecord — one in-flight projectile at the producer's current tick (v17+).In-flight projectile query facade (v17+).Query subclass — wires the snapshot stream toEntityQuery.Scene-object query facade.World-map element query facade.Fluent filter builder for world-map element queries.