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.