aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/bot.rs4
1 files changed, 4 insertions, 0 deletions
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<()>;