-
Notifications
You must be signed in to change notification settings - Fork 2
Developer Guide en
ZoyLuo edited this page Jun 5, 2026
·
1 revision
For developers who want to read, modify, or extend AIBot. Start with Architecture for the big picture.
./gradlew clean build # full build (make sure it passes before a PR)
./gradlew runServer # dev server
./gradlew runClient # dev clientThis project pins Yarn 1.21.3+build.2. Minecraft / Fabric API signatures change across versions — verify the current signature before touching:
- item components
- eating / food properties
- fuel registration
- mining speed
- furnace inventory
- client networking
AIBot ships two diagnostic commands supporting "change → verify → regression":
| Command | Purpose |
|---|---|
/aibot verify <bot> <feature> |
Run built-in scenarios (nav around obstacles / gaps / descent / mining / combat) and observe real behavior |
/aibot deplint <bot> <spec> |
Offline-audit a goal's plan chain (just the GoalPlanner output, no execution) |
Plus structured logs / replay / profile:
/aibot observe tps
/aibot observe profile <bot>
/aibot observe replay …- Extend
AbstractTask, implementonStart/onTick/onAbort. - Follow the Task System: G1 no sub-task assignment inside (call shared primitives
BlockMiner/DigNav/ActionPack); G2 touch the world only on the main thread. - For stationary tasks, override
isWaiting()totrueand bring your ownNO_PROGRESS/timeoutwatchdog. - Finish with
complete()/fail(reason); make the failure reason clear (for re-planning and log diagnosis).
- Register via
register("tool_name", description, schema, [Group], handler)inToolRegistry. - Pick the right
Group(low-level / memory / coordination, or default high-level) — affected by thebrainconfig toggles (see Configuration). - In the handler, resolve params into a Task System or Goal Engine rather than touching the world directly — keep LLM plans, Tasks execute.
- Add a variant to the sealed
Goaltype. - Add the "how to acquire" logic in
GoalPlanner'sensureItem/ planning branches. - Validate the back-chain with
/aibot deplintbefore live-testing.
brain/ Brain: LLM requests, ToolRegistry, ActionDispatcher
goal/ Goals: Goal, GoalPlanner, GoalExecutor
task/ Task state machines + coordinators + watchdogs
action/ low-level action primitives
pathfinding/ A* pathfinding & stand-ability
craft/ mining/ recipes & ore knowledge
entity/ AIPlayerEntity
command/ /aibot commands
network/ persist/ memory/ observe/ log/ mixin/ infrastructure
See Architecture. Issues & PRs welcome 🙌
AIBot · GitHub · MIT License · LLM plans · Tasks execute · Bob survives
新手上路
理解原理
参与开发
- Home
- Getting Started
- Commands
- Configuration
- Client Panel
- Architecture
- Goal Engine
- Task System
- Brain & Tools
- Safety Net
- Developer Guide
- FAQ
主仓库 · MIT