1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

reexport azalea-chat and add goto docs

This commit is contained in:
mat 2023-05-13 19:08:08 -05:00
parent 2057877eba
commit ca39b8b6af
2 changed files with 8 additions and 0 deletions

View file

@ -14,6 +14,7 @@ use app::{App, Plugin, PluginGroup};
pub use azalea_auth as auth;
pub use azalea_block as blocks;
pub use azalea_brigadier as brigadier;
pub use azalea_chat as chat;
pub use azalea_client::*;
pub use azalea_core::{BlockPos, Vec3};
pub use azalea_protocol as protocol;

View file

@ -70,6 +70,13 @@ pub trait PathfinderClientExt {
}
impl PathfinderClientExt for azalea_client::Client {
/// ```no_run
/// # use azalea::prelude::*;
/// # use azalea::{BlockPos, pathfinder::BlockPosGoal};
/// # fn example(bot: &Client) {
/// bot.goto(BlockPosGoal::from(BlockPos::new(0, 70, 0)));
/// # }
/// ```
fn goto(&self, goal: impl Goal + Send + Sync + 'static) {
self.ecs.lock().send_event(GotoEvent {
entity: self.entity,