diff options
Diffstat (limited to 'azalea/src')
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 3a75bff7..f0382634 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -699,8 +699,22 @@ fn stop_pathfinding_on_instance_change( } /// A component that makes bots run /particle commands while pathfinding to show -/// where they're going. This requires the bots to have op permissions, and -/// it'll make them spam *a lot* of commands. +/// where they're going. This requires the bots to have server operator +/// permissions, and it'll make them spam *a lot* of commands. +/// +/// ``` +/// async fn handle(mut bot: Client, event: azalea::Event, state: State) -> anyhow::Result<()> { +/// match event { +/// azalea::Event::Init => { +/// bot.ecs +/// .lock() +/// .entity_mut(bot.entity) +/// .insert(PathfinderDebugParticles); +/// } +/// _ => {} +/// } +/// } +/// ``` #[derive(Component)] pub struct PathfinderDebugParticles; |
