How creator1116/rapidbot works
rapidbot is a headless Rust framework for operating Minecraft Java Edition bots with vanilla-like protocol behavior, timing, and physics. A caller configures and spawns a bot, which resolves a server address, authenticates if requested, connects and logs in, then runs configuration and play ticks. Controllers supply actions; modeled input, movement, world state, and packet handling produce the bot’s server-visible behavior and events. The README documents the major crate responsibilities; source excerpts confirm several client, physics, and interaction links, while unsampled subsystem internals are not inferred.
Main entry points: play.rs Play state · connection.rs Async connection · mod.rs Tick loop · interact.rs Combat and digging
Components 25
Bot client
- Bot lifecycle
crates/client/src/bot.rs - Address resolution
crates/client/src/address.rs - Client login
crates/client/src/login.rs - Tick loop
crates/client/src/game/mod.rs - Play state
crates/client/src/game/play.rs - Controller actions
crates/client/src/controller.rs - Chat and commands
crates/client/src/chat.rs - Combat and digging
crates/client/src/interact.rs - Entity tracking
crates/client/src/entities.rs - Inventory state
crates/client/src/inventory.rs - Resource packs
crates/client/src/packs.rs
Wire protocol
- Async connection
crates/protocol/src/connection.rs - Packet framing
crates/protocol/src/frame.rs - Packet definitions
crates/protocol/src/packets/play.rs - Wire types
crates/buf/src/primitives.rs - Network NBT
crates/nbt/src/lib.rs
Game simulation
- World and blocks
crates/world/src/world.rs - Collision shapes
crates/world/src/shape.rs - Player physics
crates/physics/src/player.rs
Authentication
- Account authentication
crates/auth/src/lib.rs
Input and recording
- Modeled input
crates/human/src/mouse.rs - Input recorder
crates/recorder/src/main.rs
Other components
- Bot application
- Minecraft server
- Microsoft and game services
Connections 29
- Bot application → Bot lifecycle: spawns
README.md - Bot lifecycle → Address resolution: resolves address
- Bot lifecycle → Client login: starts login
- Client login → Async connection: opens connection
- Client login → Account authentication: authenticates optionally
- Account authentication → Microsoft and game services: requests tokens
crates/auth/src/lib.rs - Account authentication → Minecraft server: joins session
crates/auth/src/lib.rs - Async connection → Minecraft server: exchanges packets
README.md - Async connection → Packet framing: frames packets
README.md - Packet definitions → Wire types: encodes fields
README.md - Tick loop → Play state: runs play state
crates/client/src/game/mod.rs - Tick loop → Async connection: processes packets
crates/client/src/game/mod.rs - Play state → Entity tracking: updates entities
crates/client/src/game/play.rs - Play state → World and blocks: updates chunks
crates/client/src/game/play.rs - Tick loop → Resource packs: polls pack status
crates/client/src/game/mod.rs - Bot application → Controller actions: implements
README.md - Tick loop → Controller actions: ticks controller
README.md - Controller actions → Modeled input: models input
README.md - Controller actions → Player physics: drives movement
README.md - Player physics → World and blocks: queries terrain
README.md - World and blocks → Collision shapes: uses shapes
crates/world/src/shape.rs - Play state → Chat and commands: dispatches chat
crates/client/src/game/play.rs - Play state → Combat and digging: dispatches interactions
crates/client/src/game/play.rs - Combat and digging → Entity tracking: targets entities
crates/client/src/interact.rs - Combat and digging → World and blocks: reads block state
crates/client/src/interact.rs - Combat and digging → Async connection: sends actions
crates/client/src/interact.rs - Play state → Inventory state: updates inventory
crates/client/src/game/play.rs - Input recorder → Modeled input: fits input profile
- Packet definitions → Network NBT: carries NBT