diff options
| author | mat <git@matdoes.dev> | 2025-12-15 14:59:26 +0700 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-15 14:59:26 +0700 |
| commit | 0569ffd2d85585eb69de9068ab3f62e768bce4e7 (patch) | |
| tree | e20d7faf8df7ede4eb3f52d3223b27782a964be0 /azalea | |
| parent | 232f1a434406d77dc5ef1d19edcdf006e32491e8 (diff) | |
| download | azalea-drasl-0569ffd2d85585eb69de9068ab3f62e768bce4e7.tar.xz | |
write/update docs for several items
Diffstat (limited to 'azalea')
| -rw-r--r-- | azalea/README.md | 2 | ||||
| -rw-r--r-- | azalea/src/bot.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/azalea/README.md b/azalea/README.md index ca081f8e..8a02e7da 100644 --- a/azalea/README.md +++ b/azalea/README.md @@ -89,7 +89,7 @@ Azalea lets you create "swarms", which are a group of bots in the same world tha Azalea uses [Bevy ECS](https://docs.rs/bevy_ecs) internally to store information about the world and clients. Bevy plugins are more powerful than async handler functions, but more difficult to use. See [pathfinder](https://github.com/azalea-rs/azalea/blob/main/azalea/src/pathfinder/mod.rs) as an example of how to make a plugin. You can then enable a plugin by adding `.add_plugin(ExamplePlugin)` in your client/swarm builder. -Everything in Azalea is implemented as a Bevy plugin, which means you can disable default behaviors (like, physics or chat signing) by disabling built-in plugins. See [`SwarmBuilder::new_without_plugins`](swarm::SwarmBuilder::new_without_plugins) to learn how to do that. +Everything inside of Azalea is implemented as a Bevy plugin, which means you can disable default behaviors (like, physics or chat signing) by disabling built-in plugins. See [`SwarmBuilder::new_without_plugins`](swarm::SwarmBuilder::new_without_plugins) to learn how to do that. Also note that just because something is an entity in the ECS doesn't mean that it's a Minecraft entity. You can filter for that by having `With<MinecraftEntityId>` as a filter. diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs index 3c262709..8410f0b1 100644 --- a/azalea/src/bot.rs +++ b/azalea/src/bot.rs @@ -86,10 +86,14 @@ fn stop_jumping(mut query: Query<(&mut Jumping, &mut Bot)>) { } } +/// A trait that adds a few additional functions to [`Client`] that help with +/// making bots. pub trait BotClientExt { /// Queue a jump for the next tick. fn jump(&self); /// Turn the bot's head to look at the coordinate in the world. + /// + /// To look at the center of a block, you should call [`BlockPos::center`]. fn look_at(&self, pos: Vec3); /// Get a receiver that will receive a message every tick. fn get_tick_broadcaster(&self) -> tokio::sync::broadcast::Receiver<()>; |
